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:
Get the svn info, grep for the "URL" of the repository, pull out the tag/branch/trunk, and then just show the helpful/meaningful bit.
This is useful for piping to other commands, as well:
svn status | egrep '^(M|A)' | egrep -o '[^MA\ ].*$' | xargs $EDITOR
If your customer deletes a file that is still in use by a process, that space does not get freed up (will not show up in df) until that process either closes the file on its own, or is killed.
Will search recursively and output the searchResult.txt in the same folder you are located.
Ran as the postgres user, dumps each database individually. It dumps with the create statements as well, so you can just 'zcat $x-nightly.dmp.gz | psql' to reimport/recreate a database from a backup.
search file for string1 or string2
Want to know why your load average is so high? Run this command to see what processes are on the run queue. Runnable processes have a status of "R", and commands waiting on I/O have a status of "D".
On some older versions of Linux may require -emo instead of -eo.
On Solaris: ps -aefL -o s -o user -o comm | egrep "^O|^R|COMMAND"
Yet another ps grep function, but this one includes the column headings.
This command would be useful when it is desirable to list only the directories. 'egrep' chooses only the lines that begin with 'd'.
Greps IRC logs for phrases and lists users who said them.