[plug] Adjust a timestamp by a specified amount

Bernd Felsche bernie at innovative.iinet.net.au
Sun Nov 9 17:56:52 WST 2003


On Sun, Nov 09, 2003 at 01:17:53PM +1030, Onno Benschop wrote:
> Before I start writing code, anyone know of a way of changing a file's
> time stamp by a set amount? If that question wasn't clear, I've got
> seven directories with photos from seven different cameras, each not
> syncronised to each other. I want all files to be using the same time,
> so that when I use all files in time-stamp order, I get a real sequence
> from all cameras... So directory 1 might be an hour off, directory 2
> might be 11 minutes off...

man stat

Which yields the not-entirely complete solution of

	stat --format "touch -m -d \`expr %Y + 0$offset\` %n" * | sh

-- 
/"\ Bernd Felsche - Innovative Reckoning, Perth, Western Australia
\ /  ASCII ribbon campaign | I'm a .signature virus!
 X   against HTML mail     | Copy me into your ~/.signature
/ \  and postings          | to help me spread!
_______________________________________________
plug mailing list
plug at plug.linux.org.au
http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug


More information about the plug mailing list