I need to use bsdtar to create an archive and set the modification time the same way as I would do with tar (with --mtime=date option), but I cannot find any equivalent option for bsdtar. I need to use bsdtar because with tar I have issues with extended attributes. Any suggestions?
Asked
Active
Viewed 155 times
1 Answers
1
If you don't absolutely have to do this as an argument passed to bsdtar, you can change any file's mtime with touch (requires root privileges): touch -d "<time>" <filename>
.
See https://askubuntu.com/questions/62492/how-can-i-change-the-date-modified-created-of-a-file
Otherwise this seems to be impossible to do in the exact way you described.

ps4star
- 328
- 1
- 5