Touch -d forms
der.hans
PLUGd at LuftHans.com
Fri Mar 29 16:42:12 MST 2013
Am 29. Mar, 2013 schwätzte Dazed_75 so:
moin moin,
> Looking to change some file dares to 14 hours later than the current file
> date/time stamps (they are NOT all the same). I was thinking some form of
> the -d option would work but nothing I have tried works-
$ date; touch -d "$( date -d "+14 hours" +%Y%b%d )" /tmp/fred; ls -l
/tmp/fred
Fr 29. Mär 16:57:45 MST 2013
-rw-r--r-- 1 lufthans lufthans 0 2013-03-30 01:13 /tmp/fred
The "+14 hours" only works with GNU date, but that's what we get on
GNU/Linux. BSD date really didn't like it :).
ciao,
der.hans
--
# http://www.LuftHans.com/ http://www.LuftHans.com/Classes/
# Free, Libre, and Open Source enthusiasts are collaborators. Maybe we're
# involved for slightly different reasons, but in the end, we're all
# essentially trying to go the same direction. -- der.hans, 2012Jan25
More information about the PLUG-discuss
mailing list