tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY:  cron job won't run
@ 1997-04-18 12:35 Bill Bergman
  0 siblings, 0 replies; only message in thread
From: Bill Bergman @ 1997-04-18 12:35 UTC (permalink / raw)
  To: tru64-unix-managers

I received about 20 replies to my inquiry.  Most of them said that they
were successfully running the same script.  A few others said the same
thing happened to them.  Several people asked if find was in the path.
Yes.  But I began to play around with the various parts of the command and
I now have it working in a slightly modified form. 

The original command still doesn't work.

40 4 * * * find /var/adm/syslog.dated -depth -type d -ctime +5 -exec rm -rf
{} \;


But if I change -ctime to -mtime the command works.

40 4 * * * find /var/adm/syslog.dated -depth -type d -mtime +5 -exec rm -rf
{} \;

I don't understand this well enough to understand why -ctime won't work and
-mtime will.  The man pages for find describes the two expressions like
this:

-ctime number
      TRUE if the file inode was changed in the past number days, where
      number is interpreted as described in this reference page.

-mtime number
      TRUE if the file was modified in the past number days, where number
is
      interpreted as described in this reference page.

I think that both expressions should be true but obviously the first is
not.  I'm not sure what this is telling me.  Maybe somebody out there can
explain this.



> 
> Can anyone tell me why this cron job doesn't work?  It is the same root
> crontab entry that is running successfully on 5 other machines.  On this
> machine the syslog.dated directories must be deleted manually.  I've
tried
> deleting the line and re-entering it.  Nothing works.  All the other root
> cron jobs run fine.  And this job used to run.  I tried copying the entry
> from the root crontab file on a machine where its running and pasting it
> in.  No go.  I even tried typing the command and running the job.
Nothing.
> 
> 
> 40 4 * * * find /var/adm/syslog.dated -depth -type d -ctime +5 -exec rm
-rf {} \;




Bill Bergman
Westinghouse Communications
(412) 247-6206
wrb@wcsmail.com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-04-18 12:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-04-18 12:35 SUMMARY: cron job won't run Bill Bergman

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