Hi.

Alexander V. Makartsev (12023-11-01):
> I have a "/source-folder/" which contains very large tree of folders and
> files.

The word is “directory”, not “folder”.

> 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?

When you say “combined content”, you mean merged, right? There are a lot
of different ways to combine.

> I could go on a wild chase to "ls" contents of both destination folders,
> concatenate the results, sort them somehow,
> do the same to a source folder and compare the resulting list files. Also
> create test cases to check if results are reliable.

Well, yes, that would be the simplest, probably faster than writing this
very mail:

vimdiff =(cd src && find | sort) =({ cd dst1 && find ; cd dst2 && find } | sort)

and voilà.

> But before I do that, is there a better way to accomplish the task?

You could mount -t overlay your two destination directories together and
try rsync or diff.

> Maybe some parameter for diff or rsync that I missed or another utility?

I doubt it, it is too specific a use case.

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: PGP signature

Reply via email to