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 process in unkillable state D (iowait)

Download an entire static website to your local machine
Very nice command when you want to download a site locally to your machine, including images, css and javascript

Blackhole any level zones via dnsmasq
Explanation It creates dnsmasq-com-blackhole.conf file with one line to route all domains of com zones to 0.0.0.0 You might use "address=/home.lab/127.0.0.1" to point allpossiblesubdomains.home.lab to your localhost or some other IP in a cloud.

generate random tone

command! -nargs=1 Vs vs <args>
Because entering ':' requires that you press shift, sometimes common command-line / mini-buffer commands will be capitalized by accident.

find an unused unprivileged TCP port
Some commands (such as netcat) have a port option but how can you know which ports are unused?

Complex string encoding with sed
Pipe | avoid escaping occurences problems in using sed and make it easier to use

Delete Last Line of a File if it is Blank
Use sed to remove the last line of a file only if it is empty.

Short Information about loaded kernel modules

Ease your directory exploration
Usage : tt [OCCURRENCE] tt will display a tree from your actual path tt .svn will display only line containing .svn


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: