Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!mcnc!gatech!pyr!joel From: joel@pyr.gatech.EDU (Joel Rives) Newsgroups: comp.unix.wizards Subject: removing and unremoving files Message-ID: <3841@pyr.gatech.EDU> Date: Thu, 23-Jul-87 11:25:05 EDT Article-I.D.: pyr.3841 Posted: Thu Jul 23 11:25:05 1987 Date-Received: Sat, 25-Jul-87 08:06:48 EDT References: <8414@brl-adm.ARPA> Reply-To: joel@pyr.UUCP (Joel Rives) Organization: Georgia Institute of Technology, Atlanta Lines: 25 Certainly, examples can be given where a user wishes to unremove a file which was removed a day or two ago. I think, however, that such instances may be rare. Perhaps this isn't the case (I certainly haven't done any sort of extensive research into the matter) but from personal experience, it seems that most users will know almost immediately whether they have removed a file that they shouldn't have. To cover a much larger percentage of such cases, I would suggest that a large majority of users will know for certain that they want to undelete a file before they finish their current session. Assuming that this is the case, it becomes a relatively trivial matter to have the rm command simply mv the file to a system trash directory. When the user logs out, the system can actually remove those files owned by the user that are in the trash directory. A specific command could be written to show a user his or her trash files at any given time. The unrm command could then simply mv the specified file from the trash directory into the current directory. If you wanted to add a failsafe to the system, you could have the logout sequence prompt the user before actual removal of each file in the trash directory. -- The thief Left it behind-- The moon at the window. -Ryokan