I foolishly copied a very large amount of data using cp -r
.
Looking at it now, I've realized that this means I lost my file modification times. I should have used cp -rp
.
My directory structure and files haven't changed: is there any way to copy over just the attributes/timestamps now? I'm thinking rsync
might be useful.
rsync
would be useful. In general, you only have to runrsync
with the same source and dest as the originalcp -r
. but test it withrsync --dry-run
first.