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

Show biggest files/directories, biggest first with 'k,m,g' eyecandy
I use this on debian testing, works like the other sorted du variants, but i like small numbers and suffixes :)

Capture video of a linux desktop
This will grab the image from desktop, starting with the upper-left corner at x=100, y=200 with a width and height of 1024?768.

drop first column of output by piping to this
An advantage is that this doesn't modify remained string at all. One can change {0,1} with {0,n} to drop several columns

find the longest command in your history

small CPU benchmark with PI, bc and time.
$ # 4 cores with 2500 pi digits $ CPUBENCH 4 2500 $. $ every core will use 100% cpu and you can see how fast they calculate it. $ if you do 50000 digitits and more it can take hours or days

Check if network cable is plugged in and working correctly
with 'mii-tool -w eth0' you can watch the interface for changes of the link status

Generate RSA private key and self-signed certificate
This will create, in the current directory, a file called 'pk.pem' containing an unencrypted 2048-bit RSA private key and a file called 'cert.pem' containing a certificate signed by 'pk.pem'. The private key file will have mode 600. !!ATTENTION!! ==> this command will overwrite both files if present.

a function to find the fastest DNS server
http://public-dns.info gives a list of online dns servers. you need to change the country in url (br in this url) with your country code. this command need some time to ping all IP in list.

memcache affinity: queries local memcached for stats, calculates hit/get ratio and prints it out.
queries local memcached for stats, calculates hit/get ratio and prints it out.

Rename files in batch


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: