I’m in the process of moving files between two servers with rsync. Rsync finished without error, still “du” reports different folder size on the source system than on the target system.
One example, a empty folder is once calculated correctly to 0 byte and once to 4 byte:
system 1:
# du -c path/to/folder/
4 path/to/folder/sub/subfolder
...
# ls -lah path/to/folder/sub/subfolder
total 8,0K
drwxr-xr-x 2 www-data www-data 4,0K 31. Jan 13:55 .
drwxr-xr-x 3 www-data www-data 4,0K 2. Dez 2023 ..
system 2:
# du -c path/to/folder/
0 path/to/folder/sub/subfolder
...
# ls -lah path/to/folder/sub/subfolder
total 0
drwxr-xr-x 1 www-data www-data 0 Jan 31 13:55 .
drwxr-xr-x 1 www-data www-data 22 Dec 2 2023 ..
Any idea how this can happen?