2

Is there anyway to make a tar archive that includes the creation times for the files/directories inside of it?

Melab
  • 4,048

1 Answers1

2

No, it is not possible (outside the scope of tar) because the POSIX standard does not define a timestamp for file creation. Some filesystems (e.g. ext4, JFS, Btrfs) store this value, but currently there is no Linux kernel API to access it.

Timestamp values that are readily accessible on Linux are:

  • mtime Time of last modification to file contents (data itself)

  • ctime Time of last change to file contents or file metadata (owner, group, or permissions)

  • atime Time of last access to file for reading contents

dr_
  • 29,602
  • 3
    There's an API now: https://unix.stackexchange.com/a/407305/70524 (but I don't think modifying creation time is possible anyway) – muru Jun 20 '19 at 06:32