Another fun case. Y'all know joe
and its compatriots, jed
. It makes backups of files as filename~
. After an intense editing session, your directories become littered with ~
files, which serve no purpose, and can be real pains (especially if they let people view the source of files that they shouldn't, which is a distinct possibility on a web server, where index.php~
the same as index.php
- the former lets people view source, whereas the latter is safely executed.) To combat this, I normally do:
s_alanet@codemonkey:/home/httpd/html/$ rm -f *~
Which will go and delete all the ~
files created by joe
without making me confirm each one. However, it has the capacity to misfire horribly:
s_alanet@codemonkey:/home/httpd/html/$ rm -f *
You'll note the missing ~
there. That's right - that says to delete all the files in the current directory, without asking. Whups...
Luckily, I managed to recover the files I deleted - a good thing, too, as I had put quite a few dozen hours of work into them, and my boss wanted them up on the web in a day or two.