rm and shell metacharacters
utzoo!decvax!pur-ee!pur-phy!crl
utzoo!decvax!pur-ee!pur-phy!crl
Wed Sep 23 22:01:39 AEST 1981
I also agree that the standard rm is a potentially devastating command.
However, instead of having rm know whether or not it was passed a *, I
think a far better solution would be to do what DEC's TOPS-20 does.
Every directory on TOPS-20 (or Twenex, if you prefer) has what is known
as a deleted directory. When a file is deleted, it is really just put
into this "directory". When you log out, this directory is purged, but,
until that time, you may "undelete" it. Thus, it is hard to burn your
own bridges behind you. I have heard that some of the other 11's at
Purdue have a version of rm which somewhat emulates this. (By the way,
the deleted directory is not actually a subdirectory. I believe that
it is simply a flag bit in the file's entry in the directory.) If the
user desires, or if the system needs the disk space, it is possible
to "expunge" the deleted files before logout. I feel that this change
would be a very welcome one. If someone were very ambitious, it could
possibly be extended in the kernel so that overwriting a file would also
save it in the same way.
I also agree that commands should be able to get the unexpanded version
of the command line. In fact, maybe a new system call could be added
called parse so that a command which got the unparsed line could then
go ahead and expand it, if it decided that it wanted to anyways. (Eventually,
all commands might expect to get its command line in this way???) However,
I do realize that this would entail rewriting all existing commands.
C. LaBrec
Purdue University
More information about the Comp.unix.wizards
mailing list