mjd-list-plug2 on 22 Apr 2006 05:49:11 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Perl question


> Thanks Andrew, that was exactly what I needed.

No, you really don't want to use that. It's using the "ctime".  That's
the time at which the inode was last modified.  It changes, for
example, whenever someone sets the permissions on the file.

You want the "mtime", which is the last modification time of the file.
Change the 10 in the code to a 9, or use the code I sent that has -M.

This is not a Perl thing; Perl is reporting the times that are tracked
by Unix.  The ctime is there so that the backup utilities can know
which files have had their permissions changed since the last backup.
It is almost always incorrect to use it for any other purpose.


___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug