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:
Note that the -i will not help in a script. Proper error checking is required.
This prints out a list of all zombie processes PIDs so you can do things like kill the zombies
using awk, changed the line given by sucotronic in command #11733 to print the first and second columns
not shown ifconfig error
You must have smartmontools installed for this to work. This also assumes you 512 byte sector sizes, this is pretty standard.
The command will read the apache log file and fetch the virtual host requested and the number of requests.
Sure, it's dirty, but it's quick, it only displays the excuse, and it works.
polls the pirate bay mirrors list and chooses a random site and opens it for you in firefox
Given a hosts list, ssh one by one and echo its name only if 'processname' is not running.
Monitoring system in one line :
DISK : disk space
MEM: memory ( mem , swap, Total)
CPU : all information about cpu activity
LOAD : load average
Top 30 History Command line with histogram display
capture 2000 packets and print the top 10 talkers
Caution: distructive overwrite of filenames
Useful for concatenating pdfs in date order using pdftk
Reduced to only one command. :)
Thx Mass1 for the sharing