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

dd with progress bar and remaining time displayed

List only the directories
This command would be useful when it is desirable to list only the directories. 'egrep' chooses only the lines that begin with 'd'.

Sending a file over icmp with hping
you need to start a listening hping on the reciever: hping3 --listen 10.0.2.254 -I eth0 --sign MSGID1 then you can send your file: hping3 10.0.2.254 --icmp --sign MSGID1 -d 50 -c 1 --file a_file

Analyze awk fields
translate and number lines is simpler and you use tr to choose your delimiter (eg for csv files)

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

list files by testing the ownership
Alternative to mnikhil's ls/awk solution

See the 10 programs the most used

extract element of xml
Prints the value of a XML node rather than the entire node.

Quick HTML image gallery from folder contents with Perl
This includes a title attribute so you can see the file name by hovering over an image. Also will hoover up any image format - jpg, gif and png.

count how many cat processes are running
'ps ax' provides the fill list of running processes. 'grep -c [c]at' will find all processes that match 'cat' without matching itself....


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: