commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
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.