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

Line Separator That is Width of Terminal
Creates a line seperator that will be the width of your window.

Google text-to-speech in local language or language of choice
Google text-to-speech in your local language or in language of choice via country code switch (ISO 639-1).

uniq without pre-sorting
Reads stdin, and outputs each line only once - without sorting ahead of time. This does use more memory than your system's sort utility.

Sort output by length of line
This provides a way to sort output based on the length of the line, so that shorter lines appear before longer lines. It's an addon to the sort that I've wanted for years, sometimes it's very useful. Taken from my http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.html

List open sockets protocol/address/port/state/PID/program name

du with colored bar graph
A more efficient way, with reversed order to put the focus in the big ones.

Calculate your total world compile time. (Gentoo Distros)
From Gentoo Forum, greetings to rudregues & steveL.

Give webpage status code
this function will give you a status webpage code using curl.

Have netcat listening on your ports and use telnet to test connection
This will start a netcat process listening on port 666. If you are able connect to your your server, netcat will receive the data being sent and spit it out to the screen (it may look like random garbage, so you might want to redirect it to a file).

Locate config files of the program
Locate config files of the program. May not be used for interactive programs like vim.


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: