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

Convert a string to "Title Case"

Change your timezone

grep for tabs without using Ctrl-V trick
-P tells grep to use perl regex matches (only works on the GNU grep as far as I know.)

disable history for current shell session
this will cause any commands that you have executed in the current shell session to not be written in your bash_history file upon logout

summarize a list of IP addresses, verifying IP address and giving counts for each IP found
Working with lists of IP addresses it is sometimes useful to summarize a count of how many times an IP address appears in the file. This example, summarizeIP, uses another function "verifyIP" previously defined in commandlinefu.com to ensure only valid IP addresses get counted. The summary list is presented in count order starting with highest count.

find xargs mv

find out how many days since given date
You can also do this for seconds, minutes, hours, etc... Can't use dates before the epoch, though.

List all installed Debian packages
Should work on all systems that use dpkg and APT package management.

Undo commit in Mercurial

Show bz compressed PF binary log


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: