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:
If you are stuck behind a firewall and want to synchronize time with another server but you do not want to port forward NTP (which uses UDP) then this command is handy. It gets the time from a server and sets the local time. It is not that accurate but I can live with a second or so drift.
It can work for message queue, semaphore set or shared memory just changing the parameter.
Useful when upgrading my Linux distro and trying to copy only "settings" from the old home folder to the new one.
Useful to get info about the hard disk detail.
Show the crontabs of all the users.
Sends the "USR1" signal every 1 second (-n 1) to a process called exactly "dd".
The signal in some systems can be INFO or SIGINFO ...
look at the signals list in: man kill
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.