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

Install pip with Proxy
Installs pip packages defining a proxy

A sorted summary of disk usage including hidden files and folders
Same result as with 'du -ks .[^.]* * | sort -n' but with size outputs in human readable format (e.g., 1K 234M 2G)

Extract audio stream from an video file using mencoder
This command extracts the audio stream of the video in $file and stores it in a file where the original suffix is changed to .mp3

nmap fast scan all ports target

Get IP from host
I just wanted a simple DNS request. Because host and nslookup commands are not on all systems, we use getent instead. Thanks aulem for that tip.

Check the hard disk vendor and model on Apple Mac

Open Perl module source in your editor
Ever needed to look at the Perl source of an installed module on your system? This works in 90% of cases.

Watch and cat the last file to enter a directory
Great for watching things like Maildir's or any other queue directory.

Apache memory usage

Detect illegal access to kernel space, potentially useful for Meltdown detection
Based on capsule8 agent examples, not rigorously tested


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: