https://apple.stackexchange.com/questions/99536/changing-creation-date-of-a-file

 

touch -t normally only changes the modification and access times. It only changes the creation time if the target time is before the original creation time.

touch -t 199912312359 file.txt
touch -t $(date -jf %FT%T 1999-12-31T23:59:59 +%Y%m%d%H%M%S) file.txt

SetFile -d always changes the creation time.

SetFile -d '12/31/1999 23:59:59' file.txt
SetFile -d "$(GetFileInfo -m test.txt)" file.txt

SetFile is part of the command line tools package which can be downloaded from developer.apple.com/downloads or from Xcode's preferences.

 
zip 过滤临时文件
zip -d filename.zip __MACOSX/\*
zip -d filename.zip \*/.DS_Store

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-19
  • 2021-09-08
  • 2022-12-23
  • 2022-12-23
  • 2022-01-06
猜你喜欢
  • 2022-12-23
  • 2022-02-25
  • 2021-11-26
  • 2021-07-10
  • 2021-08-02
  • 2022-12-23
相关资源
相似解决方案