On 11/27/25 5:30 PM, Samuel Sieb wrote:
On 11/27/25 4:25 PM, home user via users wrote:
On 11/27/25 4:22 PM, Samuel Sieb wrote:
On 11/27/25 2:26 PM, home user via users wrote:
While working on my back-up recovery, I wanted to compare 2 large directories:
* one on the hard drive, and
* one on a blu-ray (/run/media/root/[directory]
It took a mere 37 seconds.  The directory is about 6.7 GB (not Gb). I do not believe that the diff could have done that comparison anywhere near that fast.

I've seen this before.

What do I need to do to be sure that diff really checks every bit?

Reading the other thread, I think this description is a bit misleading. You're not diffing off the blu-ray drive itself, you made a copy to the hard drive.  Depending on how much RAM you have, a lot of that copy could be still in RAM cache.  Also, I assume you have an SSD or NVME drive and depending on exactly what that is, it could be extremely fast.   I have an NVME in this computer and I just did a speed test and got 2GB/s read speed.  That might be a reasonable time.  Did you get a reasonable output?


root@road-runner:~/backup_202504_disc# time diff -r . /run/media/root/ F40_20250409

real    0m37.147s
user    0m1.160s
sys    0m3.161s
root@road-runner:~/backup_202504_disc#

I clearly heard the blu-ray drive spin during the compare.  By the way, that desktop is 12+ years old.  It has 16 GB of memory, I don't recall the type.

So you're trying to compare the blu-ray to the copy you made from it?  I would say that the diff is working and everything is the same.  Is there some reason you're expecting it to be different?

I recall having a thread a few years about this.  Unfortunately, searching the list gives me a 4 or 5 year gap.  I was searching for "diff" and "cache".  Someone (I don't recall who) suggested a command, run as root, to clear the cache.  I have forgotten the command.

Why would you want to clear the cache?


To be sure that the diff really is comparing the actual source of the cp and the actual destination of the cp. In the past, it made a huge difference.

When I backed up 30+ GB of data to a USB stick 7 months ago a year ago, etc., I wanted to know that what was on the stick matched what was on the hard drive. Without clearing the cache, the diff took about half a minute. After clearing the cache, the diff took about 6 minutes. It matters!

Given the problems I've been having with devices and/or removable media, I think it's wise to do the diff, and to make sure what's on the hard drive is being compared to what's on the blu-ray, not in cache.

--
_______________________________________________
users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
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/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to