Help - we lost all our files!

Tony Sanders sanders at sanders.austin.ibm.com
Sat Jun 29 10:01:25 AEST 1991


dickson at escob1.UUCP (Dave Dickson) writes:
> Help!  We have been running the crontab line shown below
> 45 3 * * * find /tmp/* /usr/tmp/* -mtime +1 -print | xargs rm -r

I suggest using "find -xdev" or the equiv on your system, if it
doesn't support it, get the vendor to fix it.  There are various
ways things can get munched if you don't.

I dislike removing things automatically in the first place, might I
suggest checking free space and if low mail your list to a sys admin.
Or generate a report of who owns what and mail it to them every night.

BTW: -xdev prevents find from traversing across file systems (handy
for "find / -xdev").

-- sanders



More information about the Comp.unix.admin mailing list