Skip to main content
added 207 characters in body
Source Link
L. Scott Johnson
  • 1.5k
  • 1
  • 9
  • 17

touch has an adjust option (-A), but that is sadly limited to 99 hours, 99 minutes, and 99 seconds. But repeated applications can get you what you want:

in Bash:

# assume a year is 365 days for day in {1..365}; do touch -A 240000 folder/* done # on a mac with Xcode cmdline tools installed, # set creation time to mtime: for f in folder/* ; do SetFile -d "$(GetFileInfo -m $f)" $f done 

touch has an adjust option (-A), but that is sadly limited to 99 hours, 99 minutes, and 99 seconds. But repeated applications can get you what you want:

in Bash:

for day in {1..365}; do touch -A 240000 folder/* done 

touch has an adjust option (-A), but that is sadly limited to 99 hours, 99 minutes, and 99 seconds. But repeated applications can get you what you want:

in Bash:

# assume a year is 365 days for day in {1..365}; do touch -A 240000 folder/* done # on a mac with Xcode cmdline tools installed, # set creation time to mtime: for f in folder/* ; do SetFile -d "$(GetFileInfo -m $f)" $f done 
Source Link
L. Scott Johnson
  • 1.5k
  • 1
  • 9
  • 17

touch has an adjust option (-A), but that is sadly limited to 99 hours, 99 minutes, and 99 seconds. But repeated applications can get you what you want:

in Bash:

for day in {1..365}; do touch -A 240000 folder/* done