[Tutor] valid filenames

D-Man dsh8290@rit.edu
Mon, 2 Apr 2001 17:26:35 -0400


On Sun, Apr 01, 2001 at 12:37:24PM -0400, Rick Pasotto wrote:
| On Sun, Apr 01, 2001 at 09:24:06AM -0700, Sheila King wrote:
| > On Sun, 1 Apr 2001 17:02:57 +0200, lumbricus@gmx.net  wrote about Re:
| > [Tutor]
| > valid filenames:
| > 
| > :U can avoid by not using
| > :names like -anything
| > :           ^
| > 
| > The hyphen is not that uncommon in file names on Unix. For example,
| > Qmail expects hyphens in the .qmail filenames that can be used for
| > filtering email on the RCPT field of the email envelope, and from
| > there invoking scripts or forwarding to other addresses or whatever.
| 
| The only problem with a hyphen is when it's the first character of the
| file name. Doing that causes many commands to confuse it with an option
| and special steps have to be taken to get around that.

For example, try to remove that file :

$ rm -anything

rm: illegal option -- a
rm: illegal option -- n
rm: illegal option -- y
rm: illegal option -- t
rm: illegal option -- h
rm: illegal option -- n
rm: illegal option -- g
usage: rm [-fiRr] file ...



It wasn't even able to tell me the file DNE.

-D