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:
couldn't stand previous unsortability of at jobs list
'readlink -fn' gets canonical path of the file/directory without newline at the end;
'xsel -ib' copies pipelined string from STDIO to system clipboard (ready to be pasted with CTRL+V).
Fetches latest stable release version from first entry between tags
Tested on Windows 8 w/SSH, Cygwin - it can be tricky to quote if you dont use the $(..) syntax to echo it back out
Use tee -a to append.
Skype has an internal regex which depicts the emoticons it supports. However you cannot simply search the binary file for it. This small 181 character line will do just that, provided skype is running. And of course, only works in linux.
This will email email@example.com a message with the body: "rsync done" when there are no processes of rsync running. This can be changed for other uses by changing $(pgrep rsync) to something else, and echo "rsync done" | mailx firstname.lastname@example.org to another command.
If you have lots of subversion working copies in one directory and want to see in which repositories they are stored, this will do the trick. Can be convenient if you need to move to a new subversion server.
Get the hour and greet the user!
Make sure you add this to your bashrc, for a pleasant hacking experience!
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.