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

Record output of any command using 'tee' at backend; mainly can be used to capture the output of ssh from client side while connecting to a server.
Optionally, you can create a new function to do this with a custom command. Edit $HOME/.bashrc and add: myssh () { ssh $1 | tee sshlog ; } Save it. At command prompt: $ myssh user@server

convert MTS video file format into xvid/mp3 avi format

processes per user counter
No need for sort

return external ip
curl inet-ip.info -> 113.33.232.62\n curl inet-ip.info/ip -> 113.33.232.62 curl inet-ip.info/json -> JSON print curl inet-ip.info/json/indent -> JSON pretty print curl inet-ip.info/yaml -> YAML format curl inet-ip.info/toml -> TOML format http://inet-ip.info

Search manpages for a keyword
Search manpages for a keyword. Very useful when you don't know where to find the information.

openssl Generate Self Signed SSL Certifcate
generating self signed ssl certificate to use in dovecot postfix nginx Self signed certificates can be used for private encryptions between server and client and must be manually accepted on browser/ client

Get your external IP address
curl ifconfig.me/ip -> IP Adress curl ifconfig.me/host -> Remote Host curl ifconfig.me/ua ->User Agent curl ifconfig.me/port -> Port thonks to http://ifconfig.me/

keep an eye on system load changes
helps you keep watch on the load of a system, without having to stare constantly at the terminal. The -d argument to watch highlights the difference from the last run, making it easier to note how the load is fluctuating. The sed command just strips off the information about how long the box has been up, and how many users are logged in.

Rename files in batch

dont execute command just add it to history as a comment, handy if your command is not "complete" yet


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: