I have a file
and I want to know its size. On computer 1, I get:
$ ls -lh file
> -rw-r--r--. 1 user group 441 May 30 15:41 file
On computer 2, I get
$ ls -lh file
> -rw-r--r--. 1 user group 441 May 30 15:41 file
Okay. They agree. The filesize is 441 bytes. But now I use du
on computer 1:
$ du -h file
> 1.0K file
and on computer 2:
$ du -h file
> 32K file
Why do they not agree? I assume it has something to do with the cluster size on the filesystem. Now a folder with several subfolders and files and a total size of several 100 Megabytes is about twice as large on computer 2 than it is on computer 1. Why would one use the cluster size as it is on computer 2? It will take up much more space, depending on the typical file sizes.
Filesystem on computer 1 is afs, filesystem on computer 2 is nfs.