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

Download all images from a site
This recursively downloads all images from a given website to your /tmp directory. The -nH and -nd switches disable downloading of the directory structure.

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

Check if variable is a number

Show git branches by date - useful for showing active branches
This fixes a bug found in the other scripts which fail when a branch has the same name as a file or directory in the current directory.

intercept stdout/stderr of another process or disowned process
Useful to recover a output(stdout and stderr) "disown"ed or "nohup"ep process of other instance of ssh. With the others options the stdout / stderr is intercepted, but only the first n chars. This way we can recover ALL text of stdout or stderr

quick copy
Utilizes shell expansion of {} to give the original filename and a new filename as arguments to `cp`. Can easily be extended to make multiple copies.

Chrome sucks

convert Decimal to IP from stdin
https://stackoverflow.com/questions/10768160/ip-address-converter

Vectorize xkcd strips
Uses ImageMagick and potrace to vectorize the input image, with parameters optimized for xkcd-like pictures.

Remove all hidden files in a directory
Remove all hidden files in a directory excluding current dir . and parent dir .. with .??* that means files with at least two characters.


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: