commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. 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.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
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.
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:
Good for finding outdated timthumb.php scripts which need to be updated, anything over 2.0 should be secure, below that timthimb is vulnerable and can be used to compromise your website.
"play" is part of "SoX"
SoX - Sound eXchange, the Swiss Army knife of audio manipulation.
For details, see: man sox
biggest->small directories, then biggest->smallest files
It's useful mostly for your custom scripts, which running on specific host and tired on ssh'ing every time when you need one simple command (i use it for update remote apt repository, when new package have to be downloaded from another host).
Don't forget to set up authorization by keys, for maximum comfort.
If you need to fix a randomly failing test (race condition), you need to run it until you get that hard-to-reproduce failure.
Run this within a steady screen session.
You can get the approximate time when the remote server went down or other abnormal behavior.
UBNT iwlist command
This will, for an application that has already been removed but had its configuration left behind, purge that configuration from the system. To test it out first, you can remove the last -y, and it will show you what it will purge without actually doing it. I mean it never hurts to check first, "just in case." ;)
Are the two strings anagrams of one another?
sed splits up the strings into one character per line
the result is sorted
cmp compares the results
Note: This is not pretty. I just wanted to see if I could do it in bash.
Note: It uses fewer characters than the perl version :-)
for small output only
jobs -l |col1 72