Well, I guess it must be something proportional to the original filename plus the new filename for symlinks, and only the new filename for hardlinks, but how does this affect the disk space exactly? I just made a folder with about a hundred thousand symbolic links in it, and the folder still reported 0 bytes usage. I may be mistaken, but I even think the free capacity of the drive remained the same. Then I permanently deleted the folder and the sizes still stayed the same.

Could I fill up a hard disk just with symlinks? Or does NTFS have limitations in that no more than x symlinks are allowed on one drive/in one folder, so the capacity of the drive cannot be reached?

link|improve this question

63% accept rate
feedback

2 Answers

up vote 2 down vote accepted

The OS is reporting how much disk space each of the file's contents consume. The entry in the file table (which is what contains your list of files) is not included in this.

Often multiple file entries are normally stored on one sector.

If you keep creating files in a directory, eventually you'll notice that the total free disk space decreases just a little bit as an additional sector is allocated to store more filename entries.

Typically other information is stored along with each filename entry, such as various timestamps, owner ID, starting sector, size, attributes, permissions, etc.

Now symbolic links and hard links are just references to existing files, so additional disk space is not needed for data (file content) storage since a copy of the destination file isn't created as a result.

link|improve this answer
feedback

What happens when you format your disk is that certain space is reserved at format time for file names and other file-system metadata. This space is typically located at the back of the partition. If you use all of the reserved space it will just allocated more, and at this point you will see the free space decrease for the drive.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.