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

Grab mp3 files from your favorite netcasts, mp3blog, or sites that often have good mp3s
This was gotten from http://www.veen.com/jeff/archives/000573.html. The line will grab all the mp3 files on the urls listed in text file sourceurls.txt (one url per line) . A much more complete breakdown of the line can be found at the web site mentioned above.

play high-res video files on a slow processor
Certain codecs in high res don't play so well on my Dell Mini 9. Using this command, I can play just about anything and it keeps the sound in sync to boot!

Serve current directory tree at http://$HOSTNAME:8000/

Parse YouTube url (get youtube video id)
url can be like any one of followings: $url="MejbOFk7H6c" $url="http://youtu.be/MejbOFk7H6c" $url="https://youtube.com/watch?feature=player_embedded&v=MejbOFk7H6c#t" $url="//www.youtube.com/v/MejbOFk7H6c?hl=ru_RU&version=3&rel=0" $url="http://www.youtube.com/embed/MejbOFk7H6c?feature=player_embedded" If url mismatching, whole url will be returned.

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

Install pip with Proxy
Installs pip packages defining a proxy

List your largest installed packages (on Debian/Ubuntu)
dpigs is in the package debian-goodies (debian/ubuntu)

Advanced python tracing
Trace python statement execution and syscalls invoked during that simultaneously

Take a file as input (two columns data format) and sum values on the 2nd column for all lines that have the same value in 1st column
Example: $ cat

Generate White Noise
This command will generate white noise through your speakers (assuming you have sound enabled). It's good for staying focused, privacy, coping with tinnitus, etc. I use it to test that the sound works.


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: