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

On screen display of a command.
This is very useful if you need to show someone some text from a distance. (Like someone standing over your shoulder...) I'd recommend aliasing it to something like: alias osd_cat="osd_cat -o 400 -s 8 -c blue -d 60 -f -*-bitstream\ vera\ sans-*-*-*--200-*-*-*-*-*-*-*" xosd is the utility that provides osd_cat.

check open ports without netstat or lsof

Tail postfix current maillog and grep for "criteria"
Tail curren postfix maillog.

Watch active calls on an Asterisk PBX
Only the number of calls nothing else.

Get backup from remote host, then expand in current directory using tar

ettercap..
There weren't any one liners for ettercap on this site... tisk tisk :-) (of course you'll have to plugin your own values for the variables..)

Get My Public IP Address

Get your outgoing IP address
Instead of opening your browser, googling "whatismyip"... Also useful for scripts. dig can be found in the dnsutils package.

Empty a file
For when you want to flush all content from a file without removing it (hat-tip to Marc Kilgus).

Search some text from all files inside a directory


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: