I have some weirdness on my mac's filesystem nowadays.

I have a dir in my home dev to store my programs and git repos. Size of the dev is 630 MB. Size of the dev/todos is 637 MB and there a re some other sub dirs in this dev of 175MB and so.

What is the reason for that. Is my mac going crazy or it is git or something?

  • How do you compute the sizes, with Finder, Terminal (du) or somehow else? Also, adding some screenshots and/or specific Terminal output would make it easier for others to understand what you are seeing.
    – nohillside
    Jan 12, 2015 at 6:50

1 Answer 1


Depending on who is calculating directory sizes, hard-linked files can easily get counted twice, even though they are really only a single inode and should be counted only once.

The du terminal command is the surest way to find out how much space a directory is really taking. It never counts hard-linked files more than once.

(Caveat. If a file in directory A is hard-linked to a file in directory B, and neither directory is contained in the other, du A and du B will each count the file once, so you cannot just add the reported sizes together and get a meaningful sum. However, du C, where C is a directory that contains both A and B, will count the file only once, arbitrarily deciding whether to count the storage as part of A or as part of B.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .