8

I tried the -X switch on zip, but that did not save the date created attribute. I can get it using this method. When a file is added to a zip archive using 7-Zip, it preserves the date created and date accessed attributes. I would like to do the same on Linux and then extract my files on Windows, while preserving the date created.

8
  • 1
    If possible, change your filesystem for backup system Sep 1, 2013 at 21:54
  • Have you tried using 7-zip? It is not a Windows-specific program. Also, does your filesystem keep a record of the date created? Many do not.
    – terdon
    Sep 1, 2013 at 22:06
  • It's typically called 7z in unix.
    – slm
    Sep 1, 2013 at 22:09
  • I'm not sure I'd expect anything from the -X switch either. I think it's to include/exclude the extended attributes related to ACL.
    – slm
    Sep 1, 2013 at 22:10
  • 1
    @slm also, as far as I know, ext filesystems do not store the creation date, only the modification data so this might not be possible if the files are coming from ext.
    – terdon
    Sep 1, 2013 at 22:33

1 Answer 1

1

You could safe the times in a separate file:

(cd /path/to/ntfs/fs && getfattr -n system.ntfs_times -R .) > times

And to restore the times:

(cd /path/to/ntfs/fs && setfattr --recover=-) < times
1
  • Sounds perfect! I'll try it next chance I get. Oct 8, 2013 at 15:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .