MacOS 10.13.2 (17C88)

Backupdb is three times the size of the used space on the internal drive.

When there are lots of hardlinks in something (as there are in TM backups), does 'du' count every link, or does it count the actual file once?

It seems likely that it is actually reading the files and counting bytes, because it takes a LONG time for large files. And a hard-link could point to a directory outside of the one being measured. (But that shouldn't happen when measuring the entire backupdb.)

Other questions discuss reasons 'du' and 'df' might differ, but the ones I've read so far have reasons other than hard-links.

I expect a Backupdb to get larger with every backup, but I'm trying to figure out how much space I need to relocate it.


From man du:

Files having multiple hard links are counted (and displayed) a single time per du execution.

Directories having multiple hard links (typically Time Machine backups) are counted a single time per du execution.

From man df:

The df utility displays statistics about the amount of free disk space on the specified filesystem or on the filesystem of which file is a part.

So assuming both man pages are correct neither utility should count hard linked things twice.

You must log in to answer this question.

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