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

Copy ssh keys to user@host to enable password-less ssh logins.
Alternative for machines without ssh-copy-id

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

Pick a random line from a file
This is from perldoc -q random.*line, which says: This has a significant advantage in space over reading the whole file in. You can find a proof of this method in The Art of Computer Programming, Volume 2, Section 3.4.2, by Donald E. Knuth. Who am I to argue with Don Knuth?

Recursively create a TAGS file for an entire source tree. TAGS files are useful for editors like Vim and Emacs

convert a pdf to jpeg
Converts a .pdf to .jpg . should work with jpeg | tiff | png | gif | jp2 | pict | bmp | qtif | psd | sgi | tga

Convert all files for iPhone with HandbrakeCLI

list files recursively by size

calculate the total size of files in specified directory (in Megabytes)

Gets the english pronunciation of a phrase
Sends a string to google tranlator, which converts it to English speech. It's possible to create a nice script to do the job for us, such as #!/bin'bash curl -A "Mozilla" "http://translate.google.com/translate_tts?tl=en&q=$1" > /tmp/speak.mp3 mplayer /tmp/speak.mp3

Sort movies by length, longest first
handles file names with spaces and colons, fixes sort (numeric!), uses mplayer, same output format as other alternatives


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: