Commands using awk (1,418)

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands


Check These Out

Watch the progress of 'dd'
dcfldd is a forensic version of dd that shows a process indicator by default.

Generate a shortened URL with is.gd
Check the API. You shouldn't need sed. The print-newline at the end is to prevent zsh from inserting a % after the end-of-output. Also works with http://v.gd

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Find common groups between two users
Updated according to flatcap's suggestion, thanks!

randomize hostname and mac address, force dhcp renew. (for anonymous networking)
this string of commands will release your dhcp address, change your mac address, generate a new random hostname and then get a new dhcp lease.

Get International Space Station sighting information for your city
This command outputs a table of sighting opportunities for the International Space Station. Find the URL for your city here: http://spaceflight.nasa.gov/realdata/sightings/

Print a monthly calendar with today's date highlighted
The cal command is handy, but sometimes you want to quickly see today's date highlighted. That's why I came up with this quick command. Much like http://www.commandlinefu.com/commands/view/1342/show-this-months-calendar-with-todays-date-highlighted but cleaner and more succinct.

df without line wrap on long FS name

Check the current price of Bitcoin in USD

Delete empty directories with zsh
This command uses the recursive glob and glob qualifiers from zsh. This will remove all the empty directories from the current directory down. The **/* recurses down through all the files and directories The glob qualifiers are added into the parenthesis. The / means only directories. The F means 'full' directories, and the ^ reverses that to mean non-full directories. For more info on these qualifiers see the zsh docs: http://zsh.dotsrc.org/Doc/Release/Expansion.html#SEC87


Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: