Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!psuvax1!psuhcx!wcw From: wcw@psuhcx (William C Ward) Newsgroups: comp.cog-eng,comp.unix.xenix,comp.unix.wizards Subject: Re: Request for human interface design anecdotes (and a cure?) Message-ID: <3103@psuvax1.psu.edu> Date: Mon, 16-Nov-87 23:31:28 EST Article-I.D.: psuvax1.3103 Posted: Mon Nov 16 23:31:28 1987 Date-Received: Thu, 19-Nov-87 01:58:23 EST Sender: netnews@psuvax1.psu.edu Reply-To: wcw@psuhcx (William C Ward) Organization: Penn State University, University Park, PA Lines: 34 Xref: mnetor comp.cog-eng:292 comp.unix.xenix:1158 comp.unix.wizards:5487 In article <1689@rayssd.RAY.COM> dhb@rayssd.RAY.COM (David H. Brierley) writes: >If users removing all of their files by inadvertently typing "rm *" is >a habitual problem at your site, why not make the command default to >interactive mode? The rm * disaster catches not only the absent-minded, but also the hasty and uncoordinated. I once mistyped a command like: rm *&foo instead of rm *foo (*& is a double-strike of adjacent keys!) and the machine obediently and hastily removed all files in the directory via a background process. My screams were audible many doors down the hall as I looked helplessly at the screen. What I have done to lessen future disasters of this kind is to insert the following crontab entry for other users: # Keep second copies of recent source files (*.c, *.f, *.h) in /tmp 30 * * * * nice -10 find /usr/usr -mtime -1 -name *.[cfh] -exec cp {} /tmp \; # Get rid of old /tmp files 0 2 * * * find /tmp -atime +4 -exec rm -f {} \; If incremental dumps are done at least every 4 days, this means that most source development work that can be lost is one hour's worth, if your disk doesn't crash entirely. The extra load on a small system with a little extra space and 10 or 20 users is pretty negligible, since only files which have been modified in the last hour are copied. If security is a concern, the backup files (owned by root) can be set to 600 mode. Moreover, it protects against `generic' disasters (rm, cp, cc -o, or foolish edits). This has saved me more than once now! Bill Ward Bitnet: WCW@PSUECL Noise Control Laboratory UUCP: {gatech,rutgers,..etc.}!psuvax1!ncl!wcw The Penn. State University USnail: 157 Hammond Bldg.; Fone: (814)865-7262 University Park, PA 16802