From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078611110528.tru64-unix-managers.marc@archive.invalid> From: Bill Bergman Date: Fri, 18 Apr 1997 18:23:26 +0000 To: tru64-unix-managers Subject: SUMMARY: cron job won't run (part 2) X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078611110528 Thanks to: Hans Ranke Karl Marble Pirie Hart 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