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

Install pip with Proxy
Installs pip packages defining a proxy

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"

Mortality Countdown
watch the seconds of your life tick away - replace YYYY-mm-dd HH:MM:ss w/ your birthtime.

Draw a Sierpinski triangle
OK, not the most useful but a good way to impress friends. Requires the "display" command from ImageMagick.

reset an hanging terminal session
when your terminal session seems unrensponsive (this normally happen after outputting some binary data directly on your standard output) it may me saned by hitting: CTRL+J tput sgr0 CTRL+J Note: don't press the Enter key, just ctrl+j

How to sum lines with decimals in awk
Read all lines using decimal marker as point, then add all them up and outputs the result.

Create a tar of directory structure only

Batch File Rename with awk and sed

Remove a line from a file using sed (useful for updating known SSH server keys when they change)
For example, to remove line 5 from foo, type: vi +5d +wq foo

Returns the number of cores in a linux machine.
Original article in http://www.howtogeek.com/howto/ubuntu/display-number-of-processors-on-linux/


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: