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:
put it in crontab to get an alert when / is over 89% utilization.
use find with rsync
usage: sitepass MaStErPaSsWoRd example.com
description: An admittedly excessive amount of hashing, but this will give you a pretty secure password, It also eliminates repeated characters and deletes itself from your command history.
tr '!-~' 'P-~!-O' # this bit is rot47, kinda like rot13 but more nerdy
rev # this avoids the first few bytes of gzip payload, and the magic bytes.
this is helpful because dmesg is where i/o errors, etc are logged to... you will also be able to see when the system reboots or someone attaches a thumb drive, etc.
don't forget to set yourself up in /etc/aliases to get roots email.
this string of commands will release your dhcp address, change your mac address, generate a new random hostname and then get a new dhcp lease.
change the *.avi to whatever you want to match, you can remove it altogether if you want to check all files.
works well in crontab.
the command show can be run in vim, here is the same thing on the command line
cat script.pl | perl -MO=Deparse | perltidy
This dup finder saves time by comparing size first, then md5sum, it doesn't delete anything, just lists them.
i sorta stole this from
but it didn't work, so here it is, fixed.
updated to work with jpegs, and to use a fancy positive look behind assertion.
xargs can be used in this manner to download multiple files at a time, and xargs will in this case run 10 processes at a time and initiate a new one when the number running falls below 10.
this will show the names of the deleted directories, and will delete directories that only no files, only empty directories.
this will cause any commands that you have executed in the current shell session to not be written in your bash_history file upon logout