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

View all new log messages in real time with color
This will show all changes in all log files under /var/log/ that are regular files and don't end with `gz` nor with a number

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

See a full list of compiler defined symbols
From http://lists.debian.org/debian-devel/2001/01/msg00971.html .

Deal with dot files safely

Watch the progress of 'dd'
Pressing ctrl-t will display the progress

du disk top 10
fancy command line ncdu clone

stringContains: Determining if a String Contains a Substring

Convert files from DOS line endings to UNIX line endings
Here "^M" is NOT "SHIFT+6" and "M". Type CTRL+V+M to get it instead. Its shortest and easy. And its sed!, which is available by default in all linux flavours.. no need to install extra tools like fromdos.

easily strace all your apache *child* processes
Like the original version except it does not include the parent apache process or the grep process and adds "sudo" so it can be run by user.

Monitor a file with tail with timestamps added
Should be a bit more portable since echo -e/n and date's -Ins are not.


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: