When I tar a file and then untar it, I lose the modification and creation date of the file. Is there a way to protect the date? I need this because I have a jenkins job that uses the aws sync command after untaring and that keeps uploading the same files to s3.
答案 0 :(得分:1)
tar --atime-preserve
will preserve the access time, but the creation and modification times are not generally preserved.
If the receiving file system time stamps are very important, you might have more success with dump
and restore
commands (provided they are supported). I believe there are more options on how to handle time stamps, as they were intended for backup and restore.