[clue-tech] mtime isn't

David L. Anselmi anselmi at anselmi.us
Tue Apr 7 23:05:33 MDT 2009


chris fedde wrote:
> On Tue, Apr 7, 2009 at 8:44 PM, David L. Willson <DLWillson at thegeek.nu>wrote:
> 
>> Why is that when I copy a file from one place to another, the mtime
>> updates?
 >
> Mtime is the time when the file's inode was modified. The file system
> sees that the copy is a new inode so mtime is updated.

What Chris said.  Except I think mtime is when the file data changes. 
ctime is the inode time.  So now tell me why mv doesn't change the mtime 
(or atime).  And besides ctime, what other times change?  And with cp, 
what other times change?

So you can use -p if you don't want the times changed.

Dave



More information about the clue-tech mailing list