That i do understand. This though, when files are the same size, then it 99.99% means they are copied and are good ![]()

Get started mounting a Linux disk in WSL 2
Learn how to set up a disk mount in WSL 2 and how to access it.
That i do understand. This though, when files are the same size, then it 99.99% means they are copied and are good ![]()
I am not sure what it is you have experienced.
I have never experienced - in Windows - that if a file is the same size as the one it has been copied from, that there is any problem with it.
Unfortunately, when stuff is dying, that’;s exactly what happens. Bits get flipped, a 96 ends up an as FF and now you have a corrupt file. If that’s inside an MP3 it might not be noticeable. If it’s in a video or a picture it may appear as a weird blob on screen in playback.
If it’s in an archive file, it’s a corrupt file. If it’s in the metadata, that’s quite possible an entire directory structure that no longer be read.
So reading up on diff, it looks like it would do just that - compare files line by line to check for differences?
Yep - that’s exactly what it does.
Yep, does work. Tested it with two different files with the same name, and it outputs that they are not the same ![]()
You might find cmp is faster for your purposes - you don’t care WHAT the differences are (just that their either are some or are none) so cmp might be more apposite.
Ahh, interesting. Yes i can see that it should stop comparing as soon as it hits the first bit that is different and move on to the next file ![]()
diff is only useful in the context you are working with if the files are text. The diff command works for text files but not for binary files.
The sha256sum as mentioned does a bit for bit calculation of the data in the file (text or binary). When run on the original and also run on the copy if the returned sum value is identical that means every bit in both copies of that file are identical. A single bit difference will produce a different sum value.
diff does work on binary files. With diff -s it will either say that the files are identical or the files differ. With diff -rus you can recursively compare files from two directories.
I worked for years with satellite remote sensing data on SGI IRIX64 (spinning disks, XFS format) and later on macOS servers. Each data file had a corresponding SHA256 checksum. Data came in from a local ground station and later from ESA and NASA servers and stored on a tape robot. There were periodic reprocessings with updated software/parameters as well as various special projects using the data. Usually a few files were corrupt and had to replaced either from the local tape robot or from an external space agency server.
diff works for all files - just not in the same way. It will trigger if differences are found, i’ll just not get a read-out of where in the file the problem is. And that is all i need here ![]()
I just did diff --brief --recursive /media/carsten/WD-Backup/"Holden QiGong" /media/carsten/WD-Film/"00 - WD-Backup Backup"/"Holden QiGong" and it worked perfectly ![]()
I’m not quiet sure what this is to my situation, as i’m not using the USB drive to boot from, and i’m also not in a server environment ![]()
So, i got some Interrupted. Host Reset. which i’m not sure where came from. I therefor moved the drive to my front USB port and performed a flawless long test of 6 hours ![]()
So the drive is fine and has no problems. No errors what so ever.
Now i’ll move it back to its old port and test it again and see if the test gets interrupted again.
This test also went well - that’s good. So doesn’t look like a problem with the port or connector ![]()
I can see from others having the same interruption problem doing smartctl -t long, that it can have to do with the system putting the drive to sleep. But then again, i didn’t have that problem testing the other drives ![]()
So for now it looks like a problem with NTFS or some deeper system problems that gave other symptoms as well, where i ended up wiping the install and doing a fresh one - just to be sure to get rid of whatever did whatever it shouldn’t.
I have my 5TB which is still NTFS formatted, so i’ll see if that gives me any problems moving files around before i can format it to EXT4.
It should be possible to mount ext4, xfs, btrfs and probably any linux volumes in a wsl2 session.

Learn how to set up a disk mount in WSL 2 and how to access it.
Of course WSL 2 runs a real linux kernel!
Just need windows allow access to the disk.
Glad the long test came back clean. One thing to add now diff is working: diff -r needs both copies present at once, so it tells you the copy matched today. If WD-Backup is meant to be a backup you can trust later, it’s worth saving a checksum list once, from the copy you know is good:
cd /media/carsten/WD-Backup/"Holden QiGong"
find . -type f -print0 | xargs -0 sha256sum > ~/holden-qigong.sha256
Then any time later, on either drive or after copying the folder somewhere new:
cd /path/to/the/copy/"Holden QiGong"
sha256sum -c --quiet ~/holden-qigong.sha256
It prints only the files that fail, so no output means every file still matches bit for bit. Unlike a one-off diff, this also catches slow corruption on a drive that otherwise passes SMART. The list is tiny, so keep a copy in your home folder as well as on each drive.
(Disclosure: I work on TimeBinder, which deals with file fingerprints. Nothing here needs it.)
Yes i indeed need some checksum setup for copying and backup ![]()
I have enough space so i have two drives i use for backup. I’m just wondering if there’s an app that can easily backup to two different drives at the same time.
It’s just the /home dir. Everything else is placed on other drives and what i think i really need is also in two places. And most important documents i’ll put in NextCloud on my webhost account, which is placed in Germany - should be reasonable off site ![]()