Yesterday I put this command in root's crontab:

# remove all files in /tmp not modified in 7 days daily at 1:20
20 1 * * * find /tmp -mtime +7 -type f -exec rm -f { } ';'

It is not working as I expected since there are files in /tmp as old as last
August. There are also old directories not modified for months.

Should I put this in a shell script and use 'test' first? Would the old
subdirectories removal be fixed by changing the rm option to -rf without
adversely affecting the results?

Regards,

Rich
_______________________________________________
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to