From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,9deb23ab73c3da3d X-Google-Attributes: gidfee84,public From: Bassirou Bah Subject: Re: syslogd and syslog.dated Date: 1995/08/29 Message-ID: <41vabp$tsh@minerva.worldbank.org>#1/1 X-Deja-AN: 109083550 references: <41jd2g$79o@fang.dsto.defence.gov.au> content-type: text/plain; charset=us-ascii organization: World Bank x-url: news:41jd2g$79o@fang.dsto.defence.gov.au mime-version: 1.0 newsgroups: comp.unix.osf.osf1 x-mailer: Mozilla 1.1N (X11; I; OSF1 V3.0 alpha) You do not need a C program to do that: Try this: find /var/adm/syslog.dated -depth -type d -ctime +2 -exec rm -rf {} \; It should delete all the directories 2 day old.