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:
Same as the other rtfm's, but using the more correct xdg-open instead of $BROWSER.
I can't find a way to open info only if the term exists, so it stays out of my version.
don't `man bash`
Once you get into advanced/optimized scripts, functions, or cli usage, you will use the sort command alot. The options are difficult to master/memorize however, and when you use sort commands as much as I do (some examples below), it's useful to have the help available with a simple alias. I love this alias as I never seem to remember all the options for sort, and I use sort like crazy (much better than uniq for example).
# Sorts by file permissions
find . -maxdepth 1 -printf '%.5m %10M %p\n' | sort -k1 -r -g -bS 20%
00761 drwxrw---x ./tmp
00755 drwxr-xr-x .
00701 drwx-----x ./askapache-m
00644 -rw-r--r-- ./.htaccess
# Shows uniq history fast
history 1000 | sed 's/^[0-9 ]*//' | sort -fubdS 50%
exec bash -lxv
I use this command to start a local Python document server over HTTP port 8888.
Most of you are probably familiar with the "apropos" command for searching man pages. However, did you know there's a similar command inside of gdb? If, for example, you wanted to know all gdb commands that related to threads, you could type "apropos thread". Type "help some_command" to receive more information about a command. Type "help" by itself to see a list of help topics.