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.
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:
Wow, didn't really expect you to read this far down. The latest iteration of the site is in open beta. It's a gentle open beta-- not in prime-time just yet. It's being hosted over at UpGuard (link) and you are more than welcome to give it a shot. Couple things:
Improved version of command #8425.
This way, the default browser is used, as opposed to Firefox.
convert a unix timestamp to a human readable format.
You can use the command "full" not only with one item, with items with diferent paths, and with relatives and absolute paths.
Had trouble with the other function, because of missing semicolons. (According to my bash on OS X)
This shows all process (-e) and threads (-L) in full format (-F)
forgot to use a pv or rsync and want to know how much has been copied.
Should be the notify-send package installed
Grab the RSS link to the Picasa album. Feed it to the script when its hungry. When its done writing the shopping list, just use
wget -c -i wgetlist
to get your stuff.
sudo is optional, but to find out about all files, it is nice, or else run as superuser, ie: su -c 'du -sm * | sort -n'
This command will :
-Archive all *.dmp files individually (one file per archive) from current directory .
-Delete original file after has been compressed.
Encrypt any text to MD5 , replace text with the string you want to convert to MD5
This will create a new file with proper code formatting and all comments removed.
Script has to be modified to be executable! SRC and DEST a relative unix path, olds and news are the terms to be modified.
Very helpful to sync source folders present in different SCM.
If you dont like this one, just use rsync...
Generate a Netscape cookies file to use with Python's mechanize.
Shows the ?rendering? for each of the 256 colours in both the bold and normal variant. Using seq is helpful to get even lines, passing $((COLUMNS*2)) to column sort-of-handles the nonprintable characters.
`pwd` returns the current path
`grep -o` prints each slash on new line
perl generates the paths sequence: './.', './../.', ...
`readlink` canonicalizes paths (it makes the things more transparent)
`xargs -tn1` applies chmod for each of them. Each command applied is getting printed to STDERR.
This command will show the sum total of memory used in gigabytes by a program that spawns multiple instances of itself. Replace chrome with whatever program's memory usage you are investigating. This command is rather useless on software that only spawns a single instance of itself.
This shows the the filenames of tail output in color. Helpful if you have many log files to tail
This takes a picture (with the web cam) every 5 minutes, and send the picture to your e-mail.
Some systems support
mail -a "References: "
so that all video surveillance emails are grouped in a single email thread.
To keep your inbox clean, it is still possible to filter and move to trash video surveillance emails (and restore these emails only if you really get robbed!)