Apur-phy.135
fa.unix-wizards
utzoo!decvax!pur-ee!pur-phy!crl
Wed Sep 23 22:01:39 1981
rm and shell metacharacters
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

-----------------------------------------------------------------
gopher://quux.org/ conversion by John Goerzen <[email protected]>
of http://communication.ucsd.edu/A-News/


This Usenet Oldnews Archive
article may be copied and distributed freely, provided:

1. There is no money collected for the text(s) of the articles.

2. The following notice remains appended to each copy:

The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996
Bruce Jones, Henry Spencer, David Wiseman.