joel@pyr.gatech.EDU (Joel Rives) (07/23/87)
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
greywolf@unisoft.UUCP (The Grey Wolf @ ext 165) (07/25/87)
Removing and unremoving files...I wrote a binary version of "rm" that went through the motions of moving things to a .trash directory in the user's home directory. Linked to it were "cleanup" and "rummage", which cleaned out the trash or told you what was there. This fell into disuse only because the system seems to have lost most of the people who did anything important. Roan (RO'an) Anderson unisoft!greywolf
zemon@felix.UUCP (Art Zemon) (07/28/87)
I have fixed everybody's rm command so it is really an alias to something which prepends ".," to the filename. Then a skulker runs in the wee hours of the morning and removes such files according to an aging algorithm of my choice. (It happens to be, zap all files which have not been accessed for more than one *working* day.) You could just use find instead of writing a skulker but I also clean out things like "core" and "*.tmp". There have been times (not many, but more than one) when someone has come to me and said, "Yesterday I removed ___ and I need it back." It was sure convenient to just un-remove it instead of spinning tapes. -- -- Art Zemon FileNet Corporation Costa Mesa, California ...!hplabs!felix!zemon