2
While copying data from my old storage on a Linux computer to the new (linux-based) NAS, I accidentially failed with getting the properties (most important: the modify dates) along to the new location. I also continued to use/modify the files at the new location and hence, cannot just copy it all over again.
What I would like to do is a diff between files in the old vs. the new storage, and for those being identical, restore the properties from Linux storage to the NAS storage files.
Is there a clever way such as a script or a tool to do this? I could either run it on the Linux box or in worst case from a remote Windows computer.
Grateful for any suggestions. /Jon
You could run a cryptographic hash on the files (SHA1 maybe), compare both of each file's hashes and if identical
touch -m
the NAS file (with the appropriate date time settings). It would be a hack, but I think it would work. – Elliott Frisch – 2014-04-24T02:32:41.063Hi Elliott, Thanks for the suggestion. Yes, I will probably have to spend a few hours to create a solution like this. I was hoping I could be lazy and make use of an already-existing tool for this but as a second option your idea is good. – Jon – 2014-04-25T05:44:14.367