Newsgroups: comp.unix.wizards Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Subject: Re: unix undelete ????? Message-ID: <1991Apr29.015855.26661@athena.mit.edu> Sender: news@athena.mit.edu (News system) Organization: Massachusetts Institute of Technology References: <26671@adm.brl.mil> Date: Mon, 29 Apr 91 01:58:55 GMT Lines: 57 In article <26671@adm.brl.mil>, X903%DMAFHT1.BITNET@cunyvm.cuny.edu ( Marc Wachowitz) writes: |> On Wed, 24 Apr 91 11:59:22 EDT GC-ACCURATE Arthur W. Protin Jr. said: |> ... |> >NEVER EVER make "rm" an alias for something less dangerous than "/bin/rm" |> >People get used to using the command in a friendlier form and wreck havoc |> >when they get into a normal environment. |> >When you want a "delete" that protects you, use "delete" or "del" or |> >"RM" or ........ |> Well, perhaps you misunderstood what I proposed. I didn't think of |> replacing "/bin/rm", I meant you should replace it in your usage, |> just like Mr. Protin said :-) Mr. Protin understood just fine what you proposed. You have not understood his objection to your suggestion. If you make "rm" an alias for some less destructive file deletion command, then you might become accustomed to typing "rm" when you actually mean to do something less drastic. Then, some day you'll go to work on another Unix system, type "rm" when you were expecting the less drastic behavior, and lose. Allow me to present an example. I have "rm" aliased to "delete", my file deletion program (see comp.sources.misc). I'll be honest -- that's probably a bad idea. I tend to do things like "rm paper.*; undelete paper.tex && expunge" to get rid of all the chaff that latex generates and be left with only my original tex file (obviously, I don't do this when I have bibliography files too :-). It is quite possible that one day I'll be working on some other system where I don't have that alias, and make the mistake of removing important work. Now, obviously I don't *think* it'll happen, which is why I have the alias. The main reason I don't think it'll happen is that I do nearly all of my "real" work on systems that have my delete program and have my alias in my dotfiles. It may be true that, for me, the alias is safe, because I can remember when I'm working where. However, doing something like putting a system-wide alias for "rm" in /etc/profile (or whereever) would be a REALLY bad idea. The reason for this is that many users will never realize that the "rm" they're using that allows for recovery is not standard. They'll graduate and go to work somewhere, and the first time they accidentally delete something, presto, there's no way to get it back, and they've got a rude awakening to face. That's why I'm a bit uncomfortable with what Purdue does. They've got this "entomb" thing which replaces file-destructive system calls with functions that first move the old file out of the way before creating the new one. What happens when Purdue students go out into the real world and discover that "mv" and "rm" are permanent operation in most of it? Perhaps the benefit from the recoverability outweighs this danger; that's a judgment I'm not prepared to make here, but as I said, I'm uncomfortable with that system. -- Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8085 Home: 617-782-0710