Currently I have two directories A/ and B/ which are identical in every respect, with the exception of the timestamps. Therefore if I run the command :
rsync --dry-run -crvv A/ B/
then all files are marked "uptodate", whereas the command :
rsync --dry-run -rvv A/ B/
shows that all files are to be copied over from A/ to B/.
My question is this : given that I know the files are identical (in respect to contents), then is there any way (via rsync or otherwise) to set the timestamps for files in B/ to be identical to the timestamps of the files in A/, without copying over all the files from A/ to B/ ?
Thanks
ls
andstat
that I realized I lost all the timestamps (forgot to usesftp -p
!) They are important for me to identify the history of the files. I was saved by the answer,rsync -vrt --size-only
only took 60 seconds to run!