I'm trying to determine how big a cloned Git repository is from a local file system. It creates hard links for some but not all files. How can I determine the disk usage of it? The best I can come up with is "du -a" right now with the original and again with the clone to determine the difference, since each hard linked file will be counted only once. Ideally, I would just run du on the clone and count each hard linked file zero times.
The default behavior of du is not to count hard linked files several times.
You may enable it to count hard linked files as many times as it linked with
I have 3 links to the file of 32 Kb.
The extra 4 Kb in both cases is the size of directory itself