Windows hard link taking up space

hardlinkmklinksymbolic-linkwindowswindows 7

On my computer I create a hard link

mklink /h git-link.exe git.exe
Hardlink created for git-link.exe <<===>> git.exe

Now they both take up space

2012-04-17  12:14 AM         6,905,039 git-link.exe
2012-04-17  12:14 AM         6,905,039 git.exe

What's the point of this? Why not just make a copy?

Best Answer

When you create a hardlink, you are creating two separate file system entries pointing to the same physical data on the disk.

When you do a dir, it displays the size of the data being stored at the location the file system entry is pointing at.

So if you create 100 hard links to a single file, they will all report the same size - they are reporting the size of the data stored. This does not mean that the hardlinks take up this space - in fact they do not. A hard link takes up very little space.