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

Runs previous command but replacing
Really useful for when you have a typo in a previous command. Also, arguments default to empty so if you accidentally run: $ echo "no typozs" you can correct it with $ ^z

get useful statistics from tcpdump (sort by ip)
We can get useful statistics from tcpdump with this simple command. Thanks "Babak Farrokhi" to teaching me this ;)

Delete all empty/blank lines from text file & output to file

Run the last command as root
Same as `sudo !!`. If you do not have permission to be sudo or sudo does not installed on your system, you can use this.

Beep siren
Infinitely plays beeps with sinusoidally changing sound frequency. Ideal for alarm on an event.

Shell function to create a directory named with the current date, in the format YYYYMMDD.
Creates a directory named with the current date, in the format YYYYMMDD. If you give it a directory name as an argument, it will create the new directory inside the specified directory. This is an alternative to command #1993.

A bash timer
Starts and shows a timer. banner command is a part of the sysvbanner package. Instead of the banner an echo or figlet commands could be used. Stop the timer with Ctrl-C and elapsed time will be shown as the result.

Get acurate memory usage of a Process in MegaBytes

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

listen to ram


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: