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

Clone or rescue a block device
If you use the logfile feature of ddrescue, the data is rescued very efficiently (only the needed blocks are read). Also you can interrupt the rescue at any time and resume it later at the same point. http://www.gnu.org/software/ddrescue/ddrescue.html

Capitalize first letter of each word in a string
Capitalize first letter of each word in a string.

List only the directories
This command would be useful when it is desirable to list only the directories. 'egrep' chooses only the lines that begin with 'd'.

Get information about memory modules
To take information about the characteristics of the installed memory modules.

Execute a command, convert output to .png file, upload file to imgur.com, then returning the address of the .png.
My key is the anonymous one, is good for 50 post an hour with a maximun number of uploads a day, probably will run out, if that happend you can get a free key at the site.

Count number of Line for all the files in a directory recursively

find .txt files inside a directory and replace every occurrance of a word inside them via sed

Two command output
Summarize established connections after netstat output. Using tee and /dev/stderr you can send one command output to terminal before executing wc so you can summarize at the bottom of the output.

Sets shell timeout
Useful in root's .profile - will auto-logout after TMOUT seconds of inactivity. Close after `seconds` inactive. export TMOUT=seconds (unefunge)

Quick network status of machine
credit to tumblr engineering blog @ http://engineering.tumblr.com/


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: