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

Numbers guessing game
Felt like I need to win the lottery, and wrote this command so I train and develop my guessing abilities.

Search for files in rpm repositorys. (Mandriva linux)
Look for an rpm that supplies a specific file that you don't yet have installed. extremely useful when you need something and don't know where it is.. or what its called. note: uses grep like syntax.

Display the output of a command from the first line until the first instance of a regular expression.
If BREs can be used, this sed version will also get the job done.

Convert embedded spaces in filenames to "_" (underscore)
This command converts filenames with embedded spaces in the current directory replacing spaces with the underscore ("_") character.

Sort the size usage of a directory tree by gigabytes, kilobytes, megabytes, then bytes.
Since coreutils 7.6 provides sort -h

Execute a command at a given time
This command will create a popup reminder window to assist in remembering tasks http://i.imgur.com/2n7viiA.png is how it looks when created

Route outbound SMTP connections through a addtional IP address rather than your primary

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"

Go to the next sibling directory in alphabetical order
Sometimes you have to browse your way through a lot of sub-directories. This command cd to the next sub-directory in alphabetical order. For example, if you have the directories "lectures/01-intro", "lectures/02-basic", "lectures/03-advanced" and so on, and your PWD is "02-basic", it jumps to "03-advanced".

Make ogg file from wav file
Make ogg file from wav file


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: