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

Get the 10 biggest files/folders for the current direcotry
This command simply outputs 10 files in human readable, that takes most space on your disk in current directory.

grep for minus (-) sign
Use flag "--" to stop switch parsing

Create a new file

benchmark web server with apache benchmarking tool
-n 9000 : Number of requests to perform for the benchmarking session -c 900 : Number of multiple requests to perform at a time

Print IP of any interface. Useful for scripts.

Shows you how many hours of avi video you have.
midentify.sh is part of mplayer, but you might have to locate it on your box.

Adding Prefix to File name

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

Remove EXIF data from images with progress

Remove all unused kernels with apt-get
A little aptitude magic. Note: this will remove images AND headers. If you just want to remove images: aptitude remove ?and(~i~nlinux-im ?not(~n`uname -r`)) I used this in zsh without any problems. I'm not sure how other shells will interpret some of the special characters used in the aptitude search terms. Use -s to simulate.


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: