All commands (14,029)

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

convert a web page into a pdf
This uses the "command-line print" plugin for Firefox (http://torisugari.googlepages.com/commandlineprint2). This same plugin can also produce PNGs. On *nix, the file must exist; therefore the touch bit in front. Also, firefox seems to ignore saved user preferences when "printing" this way (margins, header, footer, etc.), so I had to tweak my ~/.mozilla/firefox/xxxxxxxx.default/prefs.js file by hand. Yup, that's *prefs.js* not user.js - apparently, firefox ignores my user.js file too...

Replace php short open tags
Tired of front end developers using short open tags in your views? This will replace all instances of

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

Are the two lines anagrams?
This works by reading in two lines of input, turning each into a list of one-character matches that are sorted and compared.

Unzip multiple files with one command
With this command you can easily unzip multiple zip files with just one command. All you need to do is to use single quotes.

List all authors of a particular git project
List everyone who committed to a particular project, listed alphabetically. To list by commits, add -n to the shortlog.

Watch a dig in progress
Watch a dig in progress

make computer speaking to you :)
you can listen to your computer, but don't be carried away

Encode a file to MPEG4 format
Encode video.avi into newvideo.avi using the libav codec to produce an MPEG4 file with a bitrate of 800

Runs a command without hangups.
puts command in background and sends its output to nohup.out file it will not die if you log out fromyour shell session ;-)


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: