Do empty folders take up space?

7,881

According to to this reddit comment and article, yes.

In case someone in the future sees this and the comment is deleted, here is what it said word-for-word.

According to this article each folder record is 1KB each. So a 500GB disk could only contain 500,000,000 folders at max. The real number would be slighty lower, since their is some additional metadata that needs to be stored.

Share:
7,881

Related videos on Youtube

clickbait
Author by

clickbait

Updated on September 18, 2022

Comments

  • clickbait
    clickbait over 1 year

    Folders have metadata such as name, date modified, permissions, etc. Is it possible to fill up a whole drive with only empty folders?

  • slhck
    slhck almost 6 years
    Note that this is specific to Windows, or rather the filesystem being used (NTFS in this case). Other OSes and file systems use different ways of storing directories.
  • cybernard
    cybernard almost 6 years
    Note: Its NOT 1k, its 1 cluster or allocation unit. This varies on the file system, NTFS is 4k by default but anything from .5k to 64k(in increments of powers of 2) is fair game for many file systems. In the FAT16 days a sector could hold 16 directory entries per sector. Now a days with long file names the ratio could be even lower. Therefore the max is probably a lot lower than 500M. Even if you use short filenames 11 characters are reserved. Some file systems,FAT32, have a backward compatibility so there are potentially 2 directory entries for each file.
  • Peregrino69
    Peregrino69 over 2 years
    Your essential message is "yes, empty directories take up space", which is already an accepted answer, but this looks like a supporting comment. Please note; SE sites aren't forums but Q&A sites. Please check out the Help section, starting with how to write a good answer. That's how you collect rep that allows you to comment; comments as answers aren't acceptable. As this really adds nothing new, I'd suggest deleting it. I'm sure your input will be valuable down the line :-)
  • phuclv
    phuclv over 2 years
    @slhck even in NTFS it varies. Older NTFS uses 4KB for each MFT entry instead of 1KB by default like modern NTFS
  • phuclv
    phuclv over 2 years
    @cybernard that's completely wrong. Each file has one corresponding MFT entry in NTFS or inode in many Unix file systems. Each MFT entry is 1KB in modern NTFS regardless of the block size, and each inode is typically 128 or 256 bytes. Small folders don't need a separate data block to be allocated at all (called resident files in NTFS, inline files in ext4), so they only consume a single inode/MFT entry