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

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

Delete all non-printing characters from a file
tr has some predefined sets of characters that are more convenient to use than characters codes

Duplicate installed packages from one machine to the other (RPM-based systems)

Git diff last two commits
How about this one ?

perl insert character on the first line on your file

Gets the english pronunciation of a phrase
Usage: say hello world how are you today

Complex string encoding with sed
Pipe | avoid escaping occurences problems in using sed and make it easier to use

Get IPv4 of eth0 for use with scripts
I've been using it in a script to build from scratch proxy servers.

lists files and folders in a folder
lists files and folders in a folder with summary.

Simple addicting bash game.
Really bored during class so I made this... Basically, you hold period (or whatever) and hit enter after a second and you need to make the next line of periods the same length as the previous line... My record was 5 lines of the same length. It's best if you do it one handed with your pointer on period and ring on enter.


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: