2

I need to know the real space a directory is using in Windows. By real space I mean the number of bytes that will be freed up if I remove the directory with the Windows explorer.

In other words:

  • Directory links cannot be counted
  • Files hardlinked outside the directory (unsaturated links) cannot be counted
  • Files hardlinked inside the directory (saturated links) but not outside must be counted once only

This is different to this question because there are two different kinds of hardlinks in a directory: files hardlinked to a file outside the directory (or subdirectories) also called unsaturated hardlinks, and files hardlinked to files inside the directory (or subdirectories) also called saturated hardlinks. Tools like du.exe or ctts.exe count only one instance of saturated hardlinks and every instance of unsaturated hardlinks.

But if I remove the directory every unsaturated hardlinks will still be in the partition and won't free up space. That's the reason for not counting unsaturated hardlinks to know the real space the directory is using.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.