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

nmap IP block and autogenerate comprehensive Nagios service checks
More info here: http://nagioswiki.com/wiki/index.php/Autocreating_Nagios_Configuration_with_Nmap_and_Nmap2Nagios.pl

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

Show top SVN committers for the last month

Delete all but the latest 5 files, ignoring directories

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

Install pip with Proxy
Installs pip packages defining a proxy

Grab a list of MP3s out of Firefox's cache
Ever gone to a site that has an MP3 embedded into a pesky flash player, but no download link? Well, this one-liner will yank the names of those tunes straight out of FF's cache in a nice, easy to read list. What you do with them after that is *ahem* no concern of mine. ;)

Delete all empty lines from a file with vim
This command delete all the empty lines (include the lines with space) from a file. g = global command \S = non-whitespace character; !\S the opposite d = delete a range

download 10 random wallpapers from google
you may want &hl=en for &hl=es for the language you may want imgsz=xxlarge for imgsz=large or whatever filter you may want q=apples or whatever

Generat a Random MAC address
Just increase the 1 at the end if you want to generate more than one. (Alternative to "| head -n N" you could use the -b flag of od: -b $[6*N]


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: