On 19 Feb 12:37, mick wrote:
On Mon, 18 Feb 2013 09:05:10 +0000 Mark Rogers mark@quarella.co.uk allegedly wrote:
On 17 February 2013 13:26, mick mbm@rlogin.net wrote:
On Sun, 17 Feb 2013 11:38:16 +0000
Michael Dorrington michael.dorrington@gmail.com allegedly wrote:
You just need to fix the timestamps so take a look at 'find' and 'touch'. For 'find' look at the '-exec' option and '{}'. For 'touch' look at '--reference=', ' --no-dereference', and '--no-create' options. The rest is left as an exercise for the reader. :)
What I didn't say in my earlier email (because it wasn't relevant) was that I have an anoracky reason of my own for wanting to keep the original file modification times.
Actually, Michael's suggestion would have solved this for you. You can tell touch to change the timestamp of file A to match that of file B. Given that the paths of A (the copied file) & B (the original file) will be pretty similar, using "find" to find any files on the old disk which haven't changed since you did the copy, and touch (via --exec) to have the copied file's timestamp updated to match the orginal file's, the process should have been quite quick even across the network. Quite elegant, in fact.
OK - I surrender. Whilst I am familiar enough with find to use formulations such as :
find . "*.o" -exec rm {} ;
and I can see that something like
find /old-disk/micks-stuff -exec touch -c -r {} ;
would pass the access time of the file(s) found on "old-disk" to touch for application to the new files, I don't see how I can get touch to recurse through "new-disk" to apply those modification times.
A naive formulation such as:
find /old-disk/micks-stuff -exec touch -c -r {} ; /new-disk/micks-stuff is just syntactically wrong.
So - what am I missing?
That by now you could have just done: rsync -avP /old-disk/micks-stuff /new-place
And have had done with it?