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

Remove all files except list

sleep for 1/10s or 1/100s or even 1/1000000s
sleep in microseconds instead of seconds Alternatively to usleep, which is not defined in POSIX 2008 (though it was defined up to POSIX 2004, and it is evidently available on Linux and other platforms with a history of POSIX compliance), the POSIX 2008 standard defines nanosleep

Unpack .tgz File On Linux
With -a you don't care about file type (bz2, gzip, etc.)

Lets Tux say the random fact. [add it to .bashrc to see it in new terminal window]

Select and Edit a File in the Current Directory
This command displays a simple menu of file names in the current directory. After the user made a choice, the command invokes the default editor to edit that file. * Without the break statement, the select command will loop forever * Setting the PS3 prompt is optional * If the user types an invalid choice (such as the letter q), then the variable $f will become an empty string. * For more information, look up the bash's select command

list block devices
Shows all block devices in a tree with descruptions of what they are.

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

get all Amazon cloud (amazonws etc) ipv4 subnets

Batch resize all images in the current directory that are bigger than 800px, height or weight.
You need to install imagemagick. On Debian type: # apt-get install imagemagick

Bytebeat
Never ending music, generated via a C snippet, piped to aplay. Taken from: http://canonical.org/~kragen/bytebeat/


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: