Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.i386 Subject: Re: Interactive 2.2 File zapper. Message-ID: <1990Jul25.235524.944@virtech.uucp> Date: 25 Jul 90 23:55:24 GMT References: <772@essnj1.ESSNJAY.COM> Reply-To: cpcahil@virtech.UUCP (Conor P. Cahill) Organization: Virtual Technologies Inc., Sterling VA Lines: 21 In article <772@essnj1.ESSNJAY.COM> smitty@essnj1.ESSNJAY.COM (Hibbard T. Smith JR) writes: >The last two lines of the distributed /etc/cleanup are as follows: >-- cd /lost+found >-- find . -mtime +14 -exec rm -rf {} \; >If there's no lost and found directory in the root file system, this deletes >everything in the system that's older than 14 days. Two possible fixes exist: This is not a problem if the shell that executes these lines is the borne shell since the borne shell exits a shell procedure (non-interactive) when a cd fails. So, to get the problem you must have changed root's login shell - something that is not recommended because it can cause this kind of problem. No beside that point, you are right, that is bad coding and should be fixed with something similar to your suggestions. -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170