Re: /etc/cron.daily/man
>>>>> "Gerry" == Gerry Jensen <gerry@blue.intele.net> writes:
Hi Gerry,
Gerry> /etc/cron.daily/man which comes with the man package reads:
Gerry> --
Gerry> # expunge old catman pages which have not been read in a week
Gerry> find /var/catman -type f -name '*[1-9nlop].gz' -atime +168 | xargs rm -f
Gerry> # expunge old catman pages which are older than one month
Gerry> find /var/catman -type f -name '*[1-9nlop].gz' -mtime +720 | xargs rm -f
Gerry> exit 0
Gerry> --
Gerry> The man page for find says that -atime will find files whose last access
Gerry> was n*24 hours ago. So, if I am not very confused (quite probable), the
Gerry> "-atime +168" above will only delete files which have not been accessed
Gerry> for 168 days, not one week as the comment says it is intended to do.
Gerry> Likewise, the "-mtime +720" will delete files older than 720 days, not
Gerry> one month as its comment states.
Yes this is an old mistake, it has been fixed in the development tree
for a long time. Below is a copy of the current version of this file
for anyone that wants to install it. Notice that this version deletes
all .gz files in /var/catman.
= 8< ======= /etc/cron.daily/man =============================
#!/bin/sh
#
# $Id: cron.daily,v 1.4 1996/02/17 16:09:20 alvar Exp $
#
# expunge old catman pages which have not been read in a week
/usr/bin/nice find /var/catman -type f -name '*.gz' -atime +7 -print | xargs rm -f
# expunge old catman pages which are older than one month
/usr/bin/nice find /var/catman -type f -name '*.gz' -mtime +30 -print | xargs rm -f
exit 0
= 8< =========================================================
alvar
--
Alvar Bray
alvar@meiko.co.uk Via: Debian Linux from home.
alvar@debian.org
alvar@netcity.co.uk
Reply to: