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:
Create a byobu (tmux) session and attach several windows to it.
Deprecated due to a change in the site design: see alternatives.
This script can be used to download enclosed files from a RSS feed. For example, it can be used to download mp3 files from a podcasts RSS feed.
Allows you to have a list of the domains on the server.
Great for sites like Gigapedia.org that give away great free rar'd books.
More similar commands here: http://www.howtogeek.com/howto/ubuntu/unzip-or-unrar-many-files-at-once-in-linux/
the command for the impatient sysadmin: simply checks every five secs, if a host or a specific service running on it is up. ideal for hosts that are configured not to respond on pings.
The tcpdump arguments are just an example.
We can get useful statistics from tcpdump with this simple command.
Thanks "Babak Farrokhi" to teaching me this ;)
- The last sed expression ensures the unicast/multicast bit is set to zero
- The greedy space replacements are for portability across UNIX seds (note there's TWO spaces and not just one, as this web shows, in s/^ */)
Knoppix is Debian running in RAM, one of the best distros I've seen, but I had to left click the hardware button to use the system, because touchpad ignored taps. Not anymore
just set macdst to the mac address of the system
you wish to wake up, the macsrc is optional but helps
use tcpreplay to broadcast or wireshark to view
Easiest way to get the external IP address.
first greps syslog for certain events (grep xxxx messages) then displays the 1st 2nd and 3rd fields (-f 1,2,3) seperated by space(-d ' ')
Nice neat feedback showing contact infomation for as many domains as you wish to feed it. I used a list of domains, each one on a new line as supplied by our registar, as we needed to check they were all upto date and back them up as we are updating them all.
Now we can capture only a specific window (we have to chose by clicking on it)
ffmpeg complains about "Frame size must be a multiple of 2" so we calculate the upper even number with (g)awk trickery.
We remove the grep, we are already using (g)awk here ....why losing time with grep !!! ;)
Meters your actual entropy with pipe viewer command