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

Retrieve a random command from the commandlinefu.com API
Seeing that we get back plain text anyway we don't need lynx. Also the sed-part removes the credit line.

Sort processes by CPU Usage

Advanced python tracing
Trace python statement execution and syscalls invoked during that simultaneously

Get current stable kernel version string from kernel.org
depends on "jq" This is more reliable in my opinion.

Find files with the same names in several directories.
cat file1 file2 file3|sort|uniq -d finds the same lines in several files, especially in files with lists of files.

Detect encoding of a text file
This command gives you the charset of a text file, which would be handy if you have no idea of the encoding.

Extract multiple tar files at once in zsh
tar doesn't support wildcard for unpacking (so you can't use tar -xf *.tar) and it's shorter and simpler than for i in *.tar;do tar -xf $i;done (or even 'for i in *.tar;tar -xf $i' in case of zsh) -i says tar not to stop after first file (EOF)

commit message generator - whatthecommit.com

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

How to pull out lines between two patterns
This command will display all lines between 2 patterns: word-a and word-b useful for grepping command outputs from 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: