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

List the Sizes of Folders and Directories
I wanted an easy way to list out the sizes of directories and all of the contents of those directories recursively.

Remove invalid key from the known_hosts file for the IP address of a host
Quick shortcut if you know the hostname and want to save yourself one step for looking up the IP address separately.

Delicious search with human readable output
You can install filterous with $ sudo apt-get install libxslt1-dev; sudo easy_install -U filterous

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

tmux start new session with title and execute command
in this examp start htop command in tmux session over the shell cosole and set title for the tmux without doing it manuelly in tmux

Uptime in minute
Want to run scripts/programs in the system after starting X minute [ For letting the system to free ]? This will give uptime in minute.

An alias to select a portion of your desktop and save it as an image.

Slow Down Command Output
( Or $ ls -lat|lolcat -a if you like it in technicolor - apt install lolcat if needed )

remove OSX resource forks ._ files
DESCRIPTION For each dir, dot_clean recursively merges all ._* files with their cor- responding native files according to the rules specified with the given arguments. By default, if there is an attribute on the native file that is also present in the ._ file, the most recent attribute will be used. If no operands are given, a usage message is output. If more than one directory is given, directories are merged in the order in which they are specified.

Limit the transfer rate and size of data over a pipe
This example will close the pipe after transferring 100MB at a speed of 3MB per second.


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: