I have a directory A with 1000 sub-directories (000-999) each containing 3500 .jpg files. I wrote a PHP script that copied each of those files to another directory B in the exact same structure, namely 1000 sub-directories each containing 3500 .jpg files, except:
- .jpg files are renamed to new names
- while sub-directories are not renamed but they are now containing different files than they do in directory A
This script ran for about 20 hours and when it finally finished I ran:
du -sb *
At their parent directory to get the apparent sizes of A and B. Interestingly here's what came up:
74778240380 A
74809644412 B
I then ran another PHP script throughout B and it turned out to have the exact same number of files as does A. Now I'm at a loss.
Why are the du -sb results different? Any other way to verify that the copy process was a success and that B is a perfect duplication of A?