[9310] in Athena Bugs
delete
daemon@ATHENA.MIT.EDU (wchuang@Athena.MIT.EDU)
Sun May 10 23:16:12 1992
From: wchuang@Athena.MIT.EDU
Date: Sun, 10 May 92 23:16:04 -0400
To: bugs@Athena.MIT.EDU
The manual page for delete has the following synopsis:
SYNOPSIS
delete [ -r ] [ -i ] [ -f ] [ -n ] [ -v ] [ -e ] [ -F ] [ -D
] [ -- ] filename ...
Now, let me create a file called "-foo":
POSSE% cat > -foo
foo
POSSE% ls -l
total 1
-rw-r--r-- 1 wchuang 4 May 10 23:12 -foo
Now let me do a "delete - -foo":
POSSE% delete - -foo
delete: -: No such file or directory
And here's what comes up:
POSSE% ls -la
total 7
drwxr-xr-x 2 wchuang 512 May 10 23:13 .
-rw-r--r-- 1 wchuang 4 May 10 23:13 .#-foo
drwxrwxrwt 4 root 5120 May 10 23:12 ..
Now if I do it the right way:
POSSE% ls -l
total 1
-rw-r--r-- 1 wchuang 4 May 10 23:13 -foo
POSSE% delete -- -foo
POSSE% ls -la
total 7
drwxr-xr-x 2 wchuang 512 May 10 23:13 .
-rw-r--r-- 1 wchuang 4 May 10 23:13 .#-foo
drwxrwxrwt 4 root 5120 May 10 23:12 ..
Apparently delete doesn't handle the "-" option correctly -- it should
just return an error and then exit, instead of going ahead and deleting
the file anyway. Why? Well, it returns an error message...
o William Chuang
o CSS Student Consultant