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.
» 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:
Live extension of an ext3 file system on logical volume $v by 200GB without the need to unmount/remount.
Requires that you have 1) a version of resize2fs that contains code merged from ext2online, and 2) kernel support for online resizing. (e.g. RHEL 5)
any HTTP requests to the machine on the specified port will be redirected to http://www.whatevs.com... quick, dirty, works fine for sites w/
usage: renam
in a script you must replace $PPID with $(awk '{print $4}' /prod/$PPID/stat)
watch the seconds of your life tick away - replace YYYY-mm-dd HH:MM:ss w/ your birthtime.
arguably better than using the driver interface. lots of potentially cool stuff to be done w/ the dcop client.
nmap accepts a wide variety of addressing notation, multiple targets/ranges, etc.
e.g. if rm is aliased for 'rm -i', you can escape the alias by prepending a backslash:
rm [file] # WILL prompt for confirmation per the alias
\rm [file] # will NOT prompt for confirmation per the default behavior of the command
...changes modify time and access time. also:
touch -r [file1] [file2] # make file2 timestamp match file1
Must be done as root - will cause subsequent ssh connections to use the identities available via the [user]'s agent socket.
Replaces A with B in binary file "orig" and saves the result to "new". You must have the hex representations of A & B. Try od: echo -e "A\c" | od -An -x
prompts for a search term and then pulls down the first result from google images
shows all RPMs with files in the current directory & its subdirectories.
deletes logs not modified in over [#] days - modify to compress or move, as needed
...if you get a certificate back, the server is accepting weak SSL ciphers