Interactive 2.2 File zapper.

Walter Mecky walter at mecky.UUCP
Fri Aug 3 09:14:36 AEST 1990


In article <2108 at cirrusl.UUCP> dhesi%cirrusl at oliveb.ATC.olivetti.com (Rahul Dhesi) writes:
< >--	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.

Guys, you talked about very many aspects of the problem and missed the
most important one. It was discussed here in november last year:

If fsck links a file in /lost+found, then its mtime is left unchanged.
That's true too for all the files in a directory tree if fsck links
in a directory. So, you MUST NOT use the mtime to decide if deleting
files in /lost+found because find deletes files in your filesystem you
have not changed the last 14 days. The idea behind the "find ..." 
seemed to be: delete the files and directory trees, which are longer 
than 14 days in /lost+found. 

In the november discussion were some solutions posted. I dont't
remember and don't trust anyone. In my /etc/cleanup there is
only mail produced for user root and no deletions of files:

   for i in `/etc/mount | cut -d' ' -f1`
   do
	 [ "`echo $i/lost+found/*`" = "$i/lost+found/*" ] || 
		   echo "There is something in $i/lost+found.\nLook at it!" | 
		   mail -s 'File(s) in /lost+found' root
   done
-- 
Walter Mecky	[ walter at mecky.uucp	or  ...uunet!unido!mecky!walter ]



More information about the Comp.unix.i386 mailing list