I am using this version of
diff on my Synology NAS to verify a backup:
xyz> diff BusyBox v1.16.1 (2014-05-29 11:26:15 CST) multi-call binary. Usage: diff [-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2 Compare files line by line and output the differences between them. This implementation supports unified diffs only. Options: -a Treat all files as text -b Ignore changes in the amount of whitespace -B Ignore changes whose lines are all blank -d Try hard to find a smaller set of changes -i Ignore case differences -L Use LABEL instead of the filename in the unified header -N Treat absent files as empty -q Output only whether files differ -r Recurse -S Start with FILE when comparing directories -T Make tabs line up by prefixing a tab when necessary -s Report when two files are the same -t Expand tabs to spaces in output -U Output LINES lines of context -w Ignore all whitespace
Now, I diff'ed two folders on my NAS using
diff -q -r /a /b | tee xyz.log. However, this commands seems to only compare the file names, not the files' contents, since it reports
Common subdirectories /a/file.ext and /b/file.ext for each and every file pair - that is, around 150.000 times. Why is is not comparing file contents, and which command should I use instead?