On Wed, Nov 01, 2023 at 08:01:19PM +0500, Alexander V. Makartsev wrote: > Hello everyone. > > I have a "/source-folder/" which contains very large tree of folders and > files. > I've manually copied a set of folders and files from it to a > "/destination-folder-one/" and > copied another set of folders and files to a "/destination-folder-two/". > > Now, is there an effective way to compare combined contents of two folders > "/destination-folder-one/" and > "/destination-folder-two/" against a "/source-folder/" to show if there is > anything that was left out?
I concur with Nicolas: every time you say "folder", a unicorn dies. You mean: the union of dest-dir-1 and dest-dir-2 should equal your source-dir? Try rsync -a source-dir/ dest-dir-2/ --compare-dest=dest-dir-1/ This one will even dutifully copy those files from source-dir which can't be found either in dest-dir-1 or in dest-dir-2. If you only want to /see/ what would be copied (always a good idea when trying untested advice from random folks on the internets :) there's the option --dry-run. Perhaps add the option -v. Rsync is magic. Cheers -- t
signature.asc
Description: PGP signature