[Techtalk] Listing differences between directory trees/contents
Akkana Peck
akkana at shallowsky.com
Mon Apr 18 00:05:24 UTC 2022
David Sumbler writes:
> I want to have a listing of the 2 directory trees, including file
> sizes, so that I can find the differences and correct things. (A full
A couple of suggestions have already been posted, but what I would
do instead is
rsync -avn dir_with_everything dir_with_missing_files
If one or both of them is FAT format (likely since one card is on
an Android tablet), then add the --size-only flag.
It won't get you your two listings, but it will tell you which files
are missing on B and present on A, or which files are in both places
but they're different sizes.
If the output looks reasonable to you, then run the same command
again but with -av instead of -avn to actually copy the files.
...Akkana
More information about the Techtalk
mailing list