1

We know that the mtime of a file can be earlier than the ctime when you make copies of files (or, in my case, move files between file systems without successfully retaining timestamps).

I see many web search results on how to copy the ctime to the mtime (using touch), but not vice versa.

In the below example, I want the file WXBR.m4b to show it as created in 2014, not 2019. Can this be done?

$  stat WXBR.m4b
  File: 'WXBR.m4b'
  Size: 370988549       Blocks: 724592     IO Block: 4096   regular file
Device: 851h/2129d      Inode: 13          Links: 1
Access: (0755/-rwxr-xr-x)  Uid: ( 1000/sarnobat)   Gid: ( 1000/sarnobat)
Access: 2019-08-07 20:40:00.300216369 -0700
Modify: 2015-07-05 19:07:38.752375000 -0700
Change: 2019-08-08 15:37:05.511788978 -0700
 Birth: -
3
  • The change time is not the creation time.
    – muru
    Aug 10, 2019 at 3:51
  • @muru - you don't know that. Aug 10, 2019 at 7:48
  • 2
    I do know that. Those are different fields, stored and displayed separately. On supported systems, the creation time is in the Birth field in stat output.
    – muru
    Aug 10, 2019 at 7:49

0

Browse other questions tagged .