Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* syslogd and syslog.dated
@ 1995-08-25  4:00 Greg Robinson
  1995-08-29  4:00 ` Bassirou Bah
  0 siblings, 1 reply; 2+ messages in thread
From: Greg Robinson @ 1995-08-25  4:00 UTC (permalink / raw)


Hi,

I'm trying to write a program which removes the huge news.log file from
our syslog.dated dirs in /var/adm 2 days ago from the current date.

What I want to know is how does syslogd create these dirs with the time
stamp on them.  I already have a small C program to calculate 2 days ago
from the current date.  I would like to run it from cron.

Something like:

/bin/rm -f /var/adm/syslog.dated/`/usr/local/etc/time`/news.log

Thankx for any help,

Greg.

--
Work: robinson@dsto.defence.gov.au
Home: greg@arrakis.apana.org.au



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: syslogd and syslog.dated
  1995-08-25  4:00 syslogd and syslog.dated Greg Robinson
@ 1995-08-29  4:00 ` Bassirou Bah
  0 siblings, 0 replies; 2+ messages in thread
From: Bassirou Bah @ 1995-08-29  4:00 UTC (permalink / raw)


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.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1995-08-29  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-08-25  4:00 syslogd and syslog.dated Greg Robinson
1995-08-29  4:00 ` Bassirou Bah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox