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

Pull git submodules in parallel using GNU parallel
Make sure to run this command in your git toplevel directory. Modify `-j4` as you like. You can also run any arbitrary command beside `git pull` in parallel on all of your git submodules.

A very simple and useful stopwatch
time read -sn1 (s:silent, n:number of characters. Press any character to stop)

Enable cd by variable names
Usage: $ mydir=/very/long/path/to/a/dir $ cd mydir I often need to cd where no man wants to go (i.e. long path). by enabling the shell option cdable_vars, I can tell cd to assume the destination is the name of a variable.

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

Quickly get summary of sizes for files and folders
Use this as a quick and simple alternative to the slightly verbose "du -s --max-depth=1"

find previously entered commands
Searches bash-history in reverse order (last entered commands first). Pressing ctrl+r again shows the next matching entry.

Check disk I/O

Stop Flash from tracking everything you do.
Brute force way to block all LSO cookies on a Linux system with the non-free Flash browser plugin. Works just fine for my needs. Enjoy.

Summarize the number of open TCP connections by state
Useful for checking the number and state of TCP connections.

Unzip multi-part zip archive
Assuming you have a multi-part archive like "archive.zip archive.z01 archive.z02 ...", unzip will not handle these correctly. If you "fix" the parts into one big file with zip -F before, it works.


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: