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

Scan all open ports without any required program

Do one ping to a URL, I use this in a MRTG gauge graph to monitor connectivity

How much RAM is Apache using?
Display the amount of memory used by all the httpd processes. Great in case you are being Slashdoted!

Delete line number 10 from file
Very useful when the ssh key of a host has changed and ssh refuses to connect to the machine, while giving you the line number that has changed in ~/.ssh/known_hosts.

list block devices
Shows all block devices in a tree with descruptions of what they are.

lists files and folders in a folder
lists files and folders in a folder with summary.

Display text as though it is being typed out in real time
Pipe Viewer allows you to monitor the progress of a data transfer or command, or to show the time elapsed, among other things. In this use, it limits the transfer rate of the echo command to 10 bytes per second, making your text appear to be typed out in real time as in Hollywood movies. Fun!

Terminal - Show directories in the PATH, one per line with sed and bash3.X `here string'
another method : awk '{gsub(/:/, "\n");print}'

mysqlcheck --defaults-file=/etc/mysql/debian.cnf --auto-repair --all-databases

Write comments to your history.
A null operation with the name 'comment', allowing comments to be written to HISTFILE. Prepending '#' to a command will *not* write the command to the history file, although it will be available for the current session, thus '#' is not useful for keeping track of comments past the current session.


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: