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

Console clock
Shows a simple clock in the console -t param removes the watch header Ctrl-c to exit

Pipe stdout and stderr, etc., to separate commands
You can use [n]> combined with >(cmd) to attach the various output file descriptors to be the input of different commands.

Monitor TCP opened connections

rsync over ssh via non-default ssh port
tested on cygwin and Fedora 9 . good to remember for those jobs where you cannot set a site-specific connect option in your ~/.ssh/config file.

Reverse SSH
this command from the source server and this follow in the destination server: ssh user@localhost -p 8888

Convert camelCase to underscores (camel_case)
Useful for switching over someone else's coding style who uses camelCase notation to your style using all lowercase with underscores.

Clone starred github repos in parallel with unlimited speed, this example will clone 25 repositories in parallel at same time.

Go up multiple levels of directories quickly and easily.
Change to your taste. Much quicker than having to add 'cd' every time. Add it to your .bashrc or .bash_profile.

scan multiple log subdirectories for the latest log files and tail them

check open ports without netstat or lsof


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: