Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ukma!uunet!swlabs!csd_v!bak From: bak@csd_v.UUCP Newsgroups: comp.cog-eng,comp.unix.xenix,comp.unix.wizards Subject: Re: Request for human interface design anecdotes Message-ID: <132@csd_v.UUCP> Date: Tue, 17-Nov-87 21:26:22 EST Article-I.D.: csd_v.132 Posted: Tue Nov 17 21:26:22 1987 Date-Received: Sat, 21-Nov-87 07:23:19 EST References: <1721@spar.SPAR.SLB.COM> <1621@megatest.UUCP> <101@ateng.UUCP> <763@rocky.STANFORD.EDU> Organization: Computer Systems Design -- Sandy Hook, Ct. Lines: 29 Xref: utgpu comp.cog-eng:292 comp.unix.xenix:1017 comp.unix.wizards:5125 Summary: rm with undelete capability In article <763@rocky.STANFORD.EDU>, andy@rocky.STANFORD.EDU (Andy Freeman) writes: > There are far more general solutions. Most people have trash cans. > One can recover their contents for some time, but they go away at > well defined times.... I use a version of rm adapted from Wizard's Grabbag in UNIX/XENIX world. It simply prepends '#' to the file name if no swithces are listed in the command line. Thus $ rm foo creates a file #foo, while $ rm -[i|f|r] foo all work normally. Since # is the shell comment charater it is very hard to unintentionally delete files with names beginning with it. My crontab contains the line 10 3 * * 0,2,4,6 find / \( -name '#*' -o -name 'tmp.*' -o -name '*.tmp' -o -name 'temp.*' -o -name '*.temp' \) -mtime +3 -exec rm -f {} \; which deletes files beginning with '#' which have been unmodified for 3 days. If disk space is a problem you can cut down the -mtime value. This script has saved me grief on more than one occasion. -- Bruce Kern -- Computer Systems Design, 29 High Rock Rd., Sandy Hook, Ct. 06482 uunet!swlabs!csd_v!bak