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

Thanks to:

Hans Ranke <Hans.Ranke@Regent.E-Technik.TU-Muenchen.DE>
Karl Marble <marblek@ci.worcester.ma.us>
Pirie Hart <pirie@u.washington.edu>

At the suggestion of Hans I ran ls -lc /var/adm/syslog.dated with the
following results:

# ls -lc /var/adm/syslog.dated
total 64
drwxr-xr-x   2 root     adm         8192 Apr 18 04:30 12-Apr-18:23
drwxr-xr-x   2 root     adm         8192 Apr 18 04:30 13-Apr-00:14
drwxr-xr-x   2 root     adm         8192 Apr 18 04:30 14-Apr-00:14
drwxr-xr-x   2 root     adm         8192 Apr 18 04:30 15-Apr-00:14
drwxr-xr-x   2 root     adm         8192 Apr 18 04:31 16-Apr-00:14
drwxr-xr-x   2 root     adm         8192 Apr 18 04:31 17-Apr-00:14
drwxr-xr-x   2 root     adm         8192 Apr 18 04:31 17-Apr-07:02
drwxr-xr-x   2 root     adm         8192 Apr 18 07:02 18-Apr-07:02

It turns out that there is a cron job backing up /var/adm/syslog.dated each
night.  That job causes the ctime to be modified but does not change the
mtime.  Therefore, the -ctime expression never evaluates as true (ctime is
never older than 5 days) so the directories are never deleted.  I am going
to include all 3 replies because each is well thought out and offers some
insight into this question.

=============================
From Hans Ranke

Try doing ls -lc /var/adm/syslog.dated  to show the ctimes.

Perhaps you have another cron job trying chown or to chmod the directories.
This will update the ctimes, but not the mtimes.


=============================
From Karl Marble

The -ctime part of find has never worked for me, or has yielded
inconsistent and unreliable results.  Backups also modify access times, so
-mtime was the only one that worked.  If you're using AdvFS, you can
preserve access times by cloning the fileset and then backing up from the
clone.

=============================
From Pirie Hart

The difference between the two options is subtle.  -ctime uses file inode
changes; -mtime uses file changes.  The inode is the internal structure
that describes the individual files in the operating system.  There is one
inode for each file.  An inode contains the mode, type, owner, and 
location of a file.  Thus, if the owner or mode or location changes, the 
inode changes but the file remains unchanged.






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 18:23 UTC | newest]

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

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