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

find process associated with a port
e.g. fuser 25/tcp (see which pid is listening on smtp)

Colored SVN diff
Simple way to achieve a colored SVN diff

Don't save commands in bash history (only for current session)
Unsetting HISTFILE avoid getting current session history list saved.

Indent a one-liner.
I often write a one-liner which I want to use later in a script.

List all execs in $PATH, usefull for grepping the resulting list
##Dependancies: bash coreutils Many executables in $PATH have the keyword somewhere other than the beginning in their file names. The command is useful for exploring the executables in $PATH like this. $ find ${PATH//:/ } -executable -type f -printf "%f\n" |grep admin lpadmin time-admin network-admin svnadmin users-admin django-admin shares-admin services-admin

Using ASCII Art output on MPlayer
Not so useful. Just a cool feature.

check open ports without netstat or lsof

Copy ssh keys to user@host to enable password-less ssh logins.
Alternative for machines without ssh-copy-id

RTFM function
Some commands have more information on 'info' than in the man pages

Shows the torrent file name along with the trackers url
Replace * with any filename matching glob or an individual filename


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: