/etc/cleanup bug! (was Re: Another fdisk partition for 386/ix.)

Greyham Stoney greyham at hades.OZ
Tue Nov 28 03:19:12 AEST 1989


in article <4339 at dell.dell.com>, jrh at mustang.dell.com (jrh) says:
% The /lost+found directory is probably there when you originally install, the
% problem is the shell script /etc/cleanup has a nasty bug in it.  They have
% a line which reads:
% 
% find /lost+found -mtime 14 -exec rm -rf {} \; > /dev/null 2>&1
% 
% This is loaded in crontab to be executed every Sunday morning by default.
% The problem is, if /lost+found has not had it's modification time changed 
% in 14 days, the entire subdirectory is removed.
.
.
.
% Next, modify /etc/cleanup to fix the problem permanently.  The easiest is
% to insert a line with:
% 
% touch /lost+found
% 
% before the 'find' command above, should clear it up...

How about changing that line to:
find /lost+found -type f -mtime 14 -exec rm -rf {} \; > /dev/null 2>&1
		 ^^^^^^^

since lost+found is a directory, it won't get nuked, and if there's anything
other than regular files in lost+found, they won't get nuked either.

Greyham.
-- 
/*  Greyham Stoney:                            Australia: (02) 428 6476  *
 *     greyham at hades.oz  - Ausonics Pty Ltd, Lane Cove, Sydney, Oz.      *
 *    TDMP/IP: Telepathic Direct Marketing Personel Interface Protocol   */



More information about the Comp.unix.i386 mailing list