in reply to Changing file modification timestamp

A file's stats are stored in the parent directory, not in the file itself. That makes the utime call that Fletch and Util recommend very efficient. The file that holds the directory inodes is usually small.

After Compline,
Zaxo

  • Comment on Re: Changing file modification timestamp

Replies are listed 'Best First'.
Re^2: Changing file modification timestamp
by MidLifeXis (Monsignor) on Jun 04, 2007 at 16:11 UTC

    Close, depending on the file system. UFS, for example, doesn't store that information in the directory, but the directory entry points to an inode that contains that information. The reason for this can be seen by attepting to make a hard link if the information is stored only in the parent directory.

    --MidLifeXis