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

alt + 1 .
alt + number + dot will insert last command argument at $number place, alt + 0 + . will print last command name. For example $ ls /tmp /var $ ls /usr /home alt + 1 + . will result in '/usr' , if you press alt + . again, it will result in '/tmp' alt + 0 + . -> 'ls'

Create a Multi-Part Archive Without Proprietary Junkware
Leave it to a proprietary software vendor to turn a cheap and easy parlor trick into a selling point. "Hey guys, why don't we turn our _collection of multiple files_ into a *collection of multiple files*!!" Extract the ^above with this: $ cat pics.tar.gz.??? | tar xzv ^extract on any Unix - no need to install junkware! (If you must make proprietary software, at least make it do something *new*) if [ -e windows ]; then use 7-Zip

Change prompt to MS-DOS one (joke)

get a mysqldump with a timestamp in the filename and gzip it all in one go
Performs a mysqldump and gzip-compresses the output file with a timestamp in the resulting dump file. Inspect the file for integrity or fun with this command afterward, if you desire: $ zcat mysqldump-2009-06-12-07.41.01.tgz | less

An alias to select a portion of your desktop and save it as an image.

Check if the LHC has destroyed the world
This says if the LHC has destroyed the world. Run it in a loop to monitor the state of Earth. Might not work reliable, if the world has actually been destroyed.

random git-commit message
Do a git commit using a random message.

Stat each file in a directory
This will run stat on each file in the directory.

Make a DVD ISO Image from a VIDEO_TS folder on MacOSX
/path/ is the root folder of the DVD, not the VIDEO_TS folder.

Play Mediafile in multipart RAR archive on the fly with buffer to seek back and forth
Fire this up in the directory of the RAR achived files to watch any archived movie tv-show or other media without having to unpack it. I also added a cache/buffer to be able to seek back and forth.


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: