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:
Count how many times a pattern is present into a file. It can be one or more lines. No overlapping. It means searching for aa on aaa will output 1 not 2.
Count how many times a pattern is present into a stream. It can be one or more lines. No overlapping. It means searching for aa on aaa will output 1 not 2.
Pings all the hosts on 192.168.1.0/24 in parallel, so it is very fast. Alive host IP addresses are echoed to stdout as pings are responded to.
Shows the OS X applications downloaded from App Store. Doesn't include manually added apps.
first grep all href images then sed the url part then wget
Converts red-cyan 3D anaglyphs to side-by-side format viewable by crossing your eyes. Useful for people who don't have 3D glasses or prefer not to use one.
Note between the last there is no plus sign
This example will close the pipe after transferring 100MB at a speed of 3MB per second.
This is for files only, for directories 'mirror' has to be used.
This command downloads the actual 20 most popular pictures from the website 500px. It uses a random name due to the fact the the pictures in 500px are stored with the same name.
UPDATED: doesn't work if no referrer is specified: --referer='http://500px.com/'
It works best if you first login and then do the fetch:
lftp -u user,pass ftp://site.com/
mirror -c --parallel=3 --use-pget-n=5 "Some folder"
There can be more than one trailing slash, all of them will be removed.
Blocksize (bs) is not mandatory. It's only needed when the count option is specified.
apt-get install cmatrix cmatrix-xfont wmctrl transset-df
Need to restart computer for mtx font to work
Commands while cmatrix is running:
1 - 9 = Change speed
SHIFT + 1 - 7 = change colors
Q = Quit
Tested in Ubuntu 10.04