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

Quick HTML image gallery from folder contents with Perl
This includes a title attribute so you can see the file name by hovering over an image. Also will hoover up any image format - jpg, gif and png.

Find recursively, from current directory down, files and directories whose names contain single or multiple whitespaces and replace each such occurrence with a single underscore.
Note the g for global in the perl expression; without it, only the first occurrence in the name would be replaced.

mp3 streaming

Bash Dialog
The dialog utility is used to create a basic level graphical user interface. We can use this in Shell script to create very useful programs.

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

escape any command aliases
e.g. if rm is aliased for 'rm -i', you can escape the alias by prepending a backslash: rm [file] # WILL prompt for confirmation per the alias \rm [file] # will NOT prompt for confirmation per the default behavior of the command

Convert all files for iPhone with HandbrakeCLI

Disable the ping response
It really disables all ICMP responses not only the ping one. If you want to enable it you can use: $ sudo -s "echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all"

Play awesome rythmic noise using aplay
Try modifying the numbers in the "(i*(i>>8|i>>9)&46&i>>8))^(i&i>>13|i>>6)" part. Crudely stolen from http://www.xkcdb.com/9067

Rotate a single page PDF by 180 degrees
More pdftk examples: http://www.pdflabs.com/docs/pdftk-cli-examples/


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: