Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!mcnc!rti!xyzzy!goudreau From: goudreau@xyzzy.UUCP Newsgroups: comp.cog-eng,comp.unix.xenix,comp.unix.wizards Subject: Re: Request for human interface design anecdotes (and a cure?) Message-ID: <392@xyzzy.UUCP> Date: Tue, 24-Nov-87 22:15:56 EST Article-I.D.: xyzzy.392 Posted: Tue Nov 24 22:15:56 1987 Date-Received: Sat, 28-Nov-87 12:45:56 EST References: <3103@psuvax1.psu.edu> <1987Nov21.014754.19660@sq.uucp> Reply-To: goudreau@dg-rtp.UUCP (Bob Goudreau) Organization: Data General Corporation, Research Triangle Park, NC Lines: 26 Xref: utgpu comp.cog-eng:316 comp.unix.xenix:1054 comp.unix.wizards:5214 In article <1987Nov21.014754.19660@sq.uucp> msb@sq.UUCP (Mark Brader) writes: >> The rm * disaster catches not only the absent-minded ... > >I thought it was about time someone expressed the opposite point of view. > >If I type "rm *", it is because I want to remove all the files. No, not >all *my* files. All *the* files that I still have write permission on, >that are in the current directory. Usually no more than about 20 of them. >In short, the proper UNIX* flavored method for protecting important files >from "rm" is to turn off the write permission bit. I'm sorry if that's what you want, because that's not what your system is going to do. I quote from the rm(1) entry in the 7th Edition Programmer's Manual: "Removal of a file requires write permission in its directory, but neither read nor write permission on the file itself." Protecting your files in this way is thus an all-or-nothing method, per directory. A better to way to understand this is to think about what's really going on at the directory level. When you remove (or move) a file within a directory, you never need to read or write the file itself. You need to rewrite the directory because you wish to change the contents of the directory file (its dir entries), and so write permission in the directory is what is required.