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

Sort and count subjects of emails stuck in Exim queue

Quickly create simple text file from command line w/o using vi/emacs
1. Issue command 2. After angled bracket appears, enter file contents 3. When done, type "EOF"

print code 3-up and syntax-highlighted for easy beach-time study
This is the setup I'm using for my largest project. It gives 357 lines per page (per side), which makes it fairly easy to carry around a significant amount of code on a few sheets of paper. Try it. (I stick to the 80 column convention in my coding. For wider code, you'll have to adjust this.)

grep processes list avoiding the grep itself
Trick to avoid the form: grep process | grep - v grep

stringContains: Determining if a String Contains a Substring

See system users

Currency Conversion
This works in Mac OS X (10.6.2) (natively comes with curl) usage: currency_convert $1(amount) $2(from_denomination) $3(to_denomination)

List of directories sorted by number of files they contain.

regex for turning a URL into a real hyperlink (i.e. for posting somewhere that accepts basic html)
This should work with anything://url.whatever etc etc ;)

Save your terminal commands in bash history in real time
Use this command if you want your terminal commands be saved in your history file in real time instead of waiting until the terminal is closed


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: