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

Using the urxvt terminal daemon
- for .xsession use - Advantages of running a urxvt daemon include faster creation time for terminal windows and a lot of saved memory. You can start new terminals as childs of urxvtd by typing urxvtc. Another advantage is, that background jobs are always owned by the urxvtd and will survive as long the daemon is running.

Deleting / Ignoring lines from the top of a file
Output lines starting at line 2.

geoip lookup

Create a continuous digital clock in Linux terminal
Same effect, only shell commands.

Automatically skip bad songs in your MPD playlist.
Case insensitive. Also you can pull in the songs from a blacklist, one per line - while :; do (mpc current | grep -i -f blacklist.txt && mpc next); sleep 5; done

Convert a string to "Title Case"
Converts the first letter of each word to upper case

Find usb device
I often use it to find recently added ou removed device, or using find in /dev, or anything similar. Just run the command, plug the device, and wait to see him and only him

How To Get the Apache Document Root

Search and replace in multiple files recursively
Replace "foo" with "bar" in all files in current directory recursively

add all files not under version control to repository
With the force options the same results can be achieved


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: