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

Use ImageMagick to get an image's properties

Count the words in any OpenOffice document (including Impress presentations)
OpenOffice, LibreOffice and OO Impress wordcount

Pretty man pages under X
You're a developer - but it doesn't mean you have to slum it! Why not spice up your man page lookups by using a decent PDF viewer. I use 'xpdf' - maybe you prefer acroread, whatever, it's just as fast as plain dull ASCII on today's machines and you can still search for stuff - that's the main reason I use PDF and not PS.

Find the package that installed a command

Recursively Find Images, Convert to JPEGS and Delete
Simple command to convert a large number of images into jpeg-format. Will delete originals after conversion.

add the result of a command into vi
':r!ls -l' results in listing the files in the current directory and paste it into vi

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

Create backup copy of file, adding suffix of the date of the file modification (NOT today's date)
If your `date` command has `-r` option, you don't need `stat`

Remove all zero size files from current directory (not recursive)

Edit 2 or more files in vim using vim -d
Use vim's diff mode to edit two or more files in one window. The '+diffoff!' turns off diff highlighting when the session is started. Use ctrl+w + ctrl+w to switch between windows.


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: