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

SED - Substitute string in next line
source: http://sed.sourceforge.net/sed1line.txt

Find the package that installed a command

Automatically connect to a host with ssh once it is online

count how many cat processes are running

list unique file extensions recursively for a path, include extension frequency stats
Get the longest match of file extension (Ex. For 'foo.tar.gz', you get '.tar.gz' instead of '.gz')

Read random news on the internet
Access a random news web page on the internet. The Links browser can of course be replaced by Firefox or any modern graphical web browser.

Show sections of a man page.
Uses the formatting of a man page to show an outline of its headers and sub-headers.

ignore hidden directory in bash completion (e.g. .svn)
add it in ~/.bashrc install bash-completion

List the binaries installed by a Debian package
This shell function displays a list of binaries contained in an installed package; works on Debian based Linux distributions.

A bash timer
Starts and shows a timer. banner command is a part of the sysvbanner package. Instead of the banner an echo or figlet commands could be used. Stop the timer with Ctrl-C and elapsed time will be shown as the result.


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: