Path: utzoo!utgpu!watmath!uunet!cs.utexas.edu!rutgers!tut.cis.ohio-state.edu!att!shuxd!attdso!galaxia!dave From: dave@galaxia.Newport.RI.US (David H. Brierley) Newsgroups: unix-pc.general Subject: Re: crontab Daemon-from-Hell Message-ID: <694@galaxia.Newport.RI.US> Date: 4 Jun 89 21:38:39 GMT References: <19071@cup.portal.com> <14373@bfmny0.UUCP> <1526@sialis.mn.org> Reply-To: dave@galaxia.Newport.RI.US (David H. Brierley) Organization: Dave's Very Own Personal System Lines: 25 In article <1526@sialis.mn.org> rjg@sialis.mn.org (Robert J. Granvin) writes: >>> cd /usr/spool/uucppublic >>> find . -type f -mtime +30 -exec rm -f {} \; >> >>This is dangerous if run as root. If anything - disk error, anything - >>happens to make /usr/spool/uucppublic unavailable, you will wipe your >>file structure. > >/usr/spool/uucppublic is not a required nor integral part of the >system, filesystem, file structure or even UUCP. You are missing the point. If you execute a 'cd' command to a directory that does not exist the only thing that happens is that you get a stupid little error message. If your current directory is '/', which is normally the case for the 'smgr' process, and you execute the two commands listed above, and for some reason the 'cd' command fails, this will have the effect of wiping out every file on your machine which has not been modified within the last 30 days. When was the last time you modified /unix? How about the various files in /bin or /usr/bin? These two commands could be potentially disastrous even if they are run as 'uucp' instead of 'root'. When was the last time you modified the files /usr/bin/uucp, /usr/bin/uux, and /usr/lib/uucp/uucico? -- David H. Brierley Home: dave@galaxia.Newport.RI.US {rayssd,xanth,lazlo,mirror}!galaxia!dave Work: dhb@rayssd.ray.com {sun,decuac,gatech,necntc,ukma}!rayssd!dhb