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.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
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:
This will compress the root directory to an external hard drive and split it to parts once it reaches the 4 Gigs file system limit.
You can simply restore it with:
restore ivf /media/My\ Passport/Fedora10bckup/root_dump_fedora
Found this one little more for me. This one removes the perl dependency (from command 2535).
Source for command : http://www.earthinfo.org/linux-disk-usage-sorted-by-size-and-human-readable/
this bzips a folder and transfers it over the network to "host" at 777k bit/s.
cstream can do a lot more, have a look http://www.cons.org/cracauer/cstream.html#usage
for example:
echo w00t, i'm 733+ | cstream -b1 -t2
hehe :)
just a alternative using a saved html file of all of my bookmarks. works well although it takes awhile.
using mb it's still readable;) a symbol variation
$ du -ms {,.[^.]}* | sort -nk1
kpartx can be found inside of the multipath-tools package
-a adds the mappings and -d deletes them
I prefer to use this and not the -n variety, so I get DNS-resolved hostnames. Nice when I'm trying to figure out who's got that port open.
It bypasses encryption overhead of SSH and depending on configuration can be significantly faster.
It's recommended to use only in trusted networks.
A short, *easy-er* to remember command for stripping whitespace and comments from a config file, (or any file for that matter).
Remember regex as:
slash, space, star.
pound, slash, bar.
pointy-hat, dollar. (or "caret, dollar" if you must)
:-P
When you don't have c_rehash handy. Really simple - if you have a .pem file that doesn't really contain a x509 cert (let's say, newreq.pem), it will create a link, simply called '.0', pointing to that file.
avoid rm to be recursive until you complete the command: put the -rf at the end!
When a fs hangs and you've just one console, even # ls could be a dangerous command. Simply put a trailing "&" and play safe
If your last command was a dud, your bash prompt will be angry at you. Otherwise it's happy. Soon you will crave its constant approval and your linux skills will improve simply to avoid low self-esteem.
less symbols, tab completion.
including # export SIMPLE_BACKUP_SUFFIX="_`date +%F`" in your .bashrc provides you to easily timestamp your files
Windows only: stops windows update and the nagging restart window.
You need your admin password for this one.
when editing .bash_profile (or .bashrc), run this to use the new version without having to exit and open a new terminal
defines a handy function for quick calculations from cli.
once defined:
? 10*2+3
Useful if non-ascii characters in filenames have been improperly encoded. Replace "PROBLEM" with the incorrect characters (e.g. 'é'), and "FIX" with the correct ones (e.g. '?').