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:
you can't reliably use diff against -r HEAD to test whether a file matches the head of the trunk.
I found out about this from Unix Power Tools, and thought it was pretty useful.
Use the -w option to change the width of the output, and the -s option to suppress lines that are the same in both files.
more information: man sdiff