All commands (14,187)

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

A "Web 2.0" domain name generator and look for register availability
You would need pwgen installed first, on ubuntu you can get it by apt-get $ sudo apt-get install pwgen

Get your internal IP address and nothing but your internal IP address
Will return your internal IP address.

Using a single sudo to run multiple && arguments
Bash's here string

Delete Last Line of a File if it is Blank
Use sed to remove the last line of a file only if it is empty.

Extract tarball from internet without local saving
Use `tar xj` for bzip2 archives.

Delete all non-printing characters from a file
tr has some predefined sets of characters that are more convenient to use than characters codes

Using numsum to sum a column of numbers.
if you, like me, do not have the numsum, this way can do the same.

Current running process ordered by %CPU
Useful to detect which process is causing system loads. It shows process PID so as we can take further actions.

Send an email from the terminal when job finishes
Sends an email from the terminal.

list block devices
Shows all block devices in a tree with descruptions of what they are.


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: