Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

PrettyPlsHelpMe

macrumors newbie
Original poster
Oct 7, 2018
1
0
Hi! I recently updated my laptop to the Mojave and now I get the error message "out of range or illegal time specification" when I try to use the format:
' touch -t CCYYMMDDHHMM '

Does anyone know if I'm doing something incorrectly or if I how to change the date created/modified on this new OS?
 

Fredouye

macrumors newbie
Aug 6, 2012
4
2
Hi! I recently updated my laptop to the Mojave and now I get the error message "out of range or illegal time specification" when I try to use the format:
' touch -t CCYYMMDDHHMM '

Does anyone know if I'm doing something incorrectly or if I how to change the date created/modified on this new OS?
Hi

it works without specifying the century :

MacBook-Pro-de-Frederic:Desktop frederic$ touch foo
MacBook-Pro-de-Frederic:Desktop frederic$ ls -l foo
-rw-r--r-- 1 frederic staff 0 9 oct 22:51 foo
MacBook-Pro-de-Frederic:Desktop frederic$ touch -t 201501012359 foo
MacBook-Pro-de-Frederic:Desktop frederic$ ls -l foo
-rw-r--r-- 1 frederic staff 0 1 jan 2015 foo
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.