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

Start vim without initialization
This will skip all initializations. Especially useful when your ~/.vimrc has something wrong.

Watch RX/TX rate of an interface in kb/s
Just a simple way without the need of additional tools. Of course, replace eth0 with your IF.

External IP (raw data)
can be used in script like : echo $(wget -qO- http://utils.admin-linux.fr/ip.php)

live ssh network throughput test
connects to host via ssh and displays the live transfer speed, directing all transferred data to /dev/null needs pv installed Debian: 'apt-get install pv' Fedora: 'yum install pv' (may need the 'extras' repository enabled)

Emptying a text file in one shot
Within vi allow to empty a text file in one shot

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

Displays the version of the Adobe Flash plugin installed
This is for Debian, simply change the path if your Flash plugin is installed elsewhere.

Find usb device
I often use it to find recently added ou removed device, or using find in /dev, or anything similar. Just run the command, plug the device, and wait to see him and only him

find with high precission (nanoseconds 1/1,000,000,000s) the last changed file.
this is good for variables if you have many script created files and if you want to know which one is the last created/changed one..

Extract title from HTML files
previous version leaves lots of blank lines


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: