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

Alias for lazy tmux create/reattach

FizzBuzz One-liner

find files containing text
I find this format easier to read if your going through lots of files. This way you can open the file in any editor and easily review the file

Command line calculator
This opens a python command line. You can use math and random and float-division is enabled (without appending .0 to integers). I just don't know how to specify a standard precision.

Rename duplicates from MusicBrainz Picard
Renames duplicates from MusicBrainz Picard, so you get the latest copy and not a bunch of duplicates.

Use QuickLook from the command line without verbose output

'hpc' in the box - starts a maximum of n compute commands modulo n controlled in parallel
the block of the loop is useful whenever you have huge junks of similar jobs, e.g., convert high res images to thumbnails, and make usage out of all the SMP power on your compute box without flooding the system. note: c is used as counter and the random sleep $ r=`echo $RANDOM%5 |bc`; echo "sleep $r"; sleep $r is just used as a dummy command.

Stream YouTube URL directly to mplayer
The original doesn't work for me - but this does. I'm guessing that Youtube updated the video page so the original doesn't work.

List all installed PERL modules by CPAN
This command will give you the detailed information about the installed perl modules i.e. installed path, Link type, version, files etc.

use SHIFT + ALT to toggle between two keyboard layouts
change the last two-character abbreviation to any layout abbreviation you want. This command will only run in the current session, add to your ~/.bashrc to make this permanent.


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: