On 7/8/23 22:13, Samuel Sieb wrote:
On 7/8/23 13:47, Barry wrote:
On 7 Jul 2023, at 18:43, home user <mattis...@comcast.net> wrote:

When I try to verify a back-up, I use "diff -r".  The directory trees being compared contain about 
870 files (mostly binary, like PNG, JPG, and so on), and take up about 707 megabytes.  The trees being 
compared are on the hard drive and on a USB-3 stick.  When I run the "diff -r" command, it seems to 
finish too quickly - it seems like less than a half of a second.  I saw similar results a few weeks ago 
comparing about 30 gigabyte trees on the hard drive vs. on a USB-3.1 stick; the results were practically 
instantaneous.  Is diff actually checking every bit (or byte), or is it using some "short cut"?

I recall that for a file is equal test cmp is the command to use not diff.

That was mentioned in an earlier message.  cmp doesn't have a recursive option 
and diff works just fine for binary files.
Also, if you run diff with the "-q" (--brief) option it will simply report 
which files differ, stopping after the first mismatch in each file, similar to what the 
cmp command would do.

--
Bob Nichols     "NOSPAM" is really part of my email address.
                Do NOT delete it.

_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to