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

Create the signature base string required for a Twitter stream feed
This is the SECOND command in a set for five that are needed for a Twitter stream feed. This command creates variable "b", the so-called "base string" required for oauth in Twitter stream feed requests. (The 256 char limit prevents giving it a better name) We use five environment variables created by a previous step: id, k1, once, ts and k3. The five environment variables are created in a separate command, please see my other commands. For more information on the signature base string, see dev.twitter.com/apps, click on any app (or create a new one) and then go to the "OAuth Tool" tab.

Rip DVD to YouTube ready MPEG-4 AVI file using mencoder
Rip DVD to YouTube ready AVI file, using MPEG-4 video codec and MP3 audio codec. Resizes to 320x240 and deinterlaces as needed.

Search some text from all files inside a directory

Play all the music in a folder, on shuffle
Page up for next song

Limit bandwidth usage by apt-get
Limits the usage of bandwidth by apt-get, in the example the command will use 30Kb/s ;) It should work for most apt-get actions (install, update, upgrade, dist-upgrade, etc.)

Play radio stream with mplayer
Above command will play Virgin Radio Dubai

Archive a directory with datestamp on filename
A useful bash function: gztardir() { if [ $# -ne 1 ] ; then echo "incorrect arguments: should be gztardir " else tar zcvf "${1%/}-$(date +%Y%m%d-%H%M).tar.gz" "$1" fi }

Just convert your all books DJVU format to PDF, with one line

Install pip with Proxy
Installs pip packages defining a proxy

Rename files in batch


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: