I had to remove all text files including a -bar.txt from the current directory using bash, so I automatically typed rm *txt resulting in this nice error:
rm: illegal option -- b usage: rm [-f | -i] [-dPRrvW] file ... unlink file
When there was just a file named -foo.txt in the directory, the error became more interesting:
rm: illegal option -- o usage: rm [-f | -i] [-dPRrvW] file ... unlink file
Then it struck me: rm is one of those old tools where you can smack all options together. Read the rest of this entry »





