<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Mar 29, 2013 at 4:42 PM, der.hans <span dir="ltr"><<a href="mailto:PLUGd@lufthans.com" target="_blank">PLUGd@lufthans.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am 29. Mar, 2013 schwätzte Dazed_75 so:<br>
<br>
moin moin,<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Looking to change some file dares to 14 hours later than the current file<br>
date/time stamps (they are NOT all the same). I was thinking some form of<br>
the -d option would work but nothing I have tried works-<br>
</blockquote>
<br></div>
$ date; touch -d "$( date -d "+14 hours" +%Y%b%d )" /tmp/fred; ls -l<br>
/tmp/fred Fr 29. Mär 16:57:45 MST 2013<br>
-rw-r--r-- 1 lufthans lufthans 0 2013-03-30 01:13 /tmp/fred<br>
<br>
The "+14 hours" only works with GNU date, but that's what we get on<br>
GNU/Linux. BSD date really didn't like it :).<br>
<br>
ciao,<br>
<br>
der.hans<span class=""><font color="#888888"><br></font></span></blockquote><div><br>This is close but not quite. Maybe I could have explained it better. I have taken a LOT if video clips here in Thailand. Unfortunately, the camera clock was still set for Arizona time until several days into the trip. Now that I have fixed that I want to re-timestamp the first 100 or so to have the timestamp adjusted +14 hours. Here is what I get from der.Hans' script:<br>
<br> larry@sunfish:~/tempwork$ ls -l target; date; touch -d "$( date -d "+14 hours" +%Y%b%d )" target; ls -l target<br> -rw-rw-r-- 1 larry larry 0 Mar 24 18:18 target<br> Fri Mar 29 23:55:49 MST 2013<br>
touch: invalid date format `2013Mar30'<br> -rw-rw-r-- 1 larry larry 0 Mar 24 18:18 target<br> larry@sunfish:~/tempwork$<br><br><br>I can fix the date format I believe, but the target's timestamp should end up being Mar 25 08:18, not Mar 30 13:55. The reason I want a script or compound command to do it is so i don't have to figure out the +14 hours 100+ times and issue 100+ touch commands.<br>
<br>Thanks, I hope I can get the timestamp extracted to a variable and use that to replace the date command (if I don't fall asleep first :-)<br><br>Larry<br><br><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class=""><font color="#888888">
-- <br>
# <a href="http://www.LuftHans.com/" target="_blank">http://www.LuftHans.com/</a> <a href="http://www.LuftHans.com/Classes/" target="_blank">http://www.LuftHans.com/<u></u>Classes/</a><br>
# Free, Libre, and Open Source enthusiasts are collaborators. Maybe we're<br>
# involved for slightly different reasons, but in the end, we're all<br>
# essentially trying to go the same direction. -- der.hans, 2012Jan25</font></span><br>---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br></blockquote></div><br><br clear="all"><br>-- <br>Dazed_75 a.k.a. Larry<br>
<br>Please protect my address like I protect yours. When sending messages to multiple recipients, use the BCC:
(Blind carbon copy). Remove addresses from a forwarded message body before clicking Send. <br>
</div></div>