[ale] modify file creation/modification time
danscox at mindspring.com
Mon Dec 27 10:34:20 EST 2004
On Mon, 2004-12-27 at 03:37 -0500, Jim Popovitch wrote:
> Is there a way, preferably w/ perl, to change the timestamp of a file?
> Specifically, I would like to modify a directory of files, but not
> change any of the modification timestamps.
See utime (man perlfunc). It should work on a directory also.
By the way, the ctime member of the inode isn't a creation time. It's
a last modified time of the metadata (permissions, modification time,
access times). MS-DOS has a create time, which gets mapped within Samba
to the ctime, I think, but that's it. Newer filesystems such as Reiser
4 may well have a create time, but traditional UNIX never has.
kernel, n.: A part of an operating system that preserves the
medieval traditions of sorcery and black art.
More information about the Ale