我们知道,查看一个目录有多大的最快捷的方法就是看看资源管理器文件夹的属性,但是我今天要说的是:如果你用这个方法去看 Windows Vista / Windows 7 系统的目录,你会被你的眼睛所欺骗,因为,Microsoft 同学在 Windows Vista/ Windows 7 里面大量使用了NTFS文件系统的特性之一的:硬连接(Hard Link)来实现WinSxS机制!
关于 WinSxS,可以看我之前写的 《WinSxS 混乱导致的应用程序不能启动》一文。
我们知道,要安装 Windows Vista / Windows 7系统,那么系统分区必须是NTFS文件系统。原因有以下一些:
系统文件保护所需
各种安全保护机制,如MIC所需
WinSxS 所需
……
关于最后一点的 WinSxS 所需,我没有看到过相关的资料说明,不过可以肯定的是,这也是Windows Vista / Windows 7 系统需要NTFS文件系统的一个条件,因为只有在 NTFS 文件系统上面,才能实现硬连接机制,也才能达到优化Windows目录占用磁盘空间的目的。
关于硬连接,MSDN是这样解释的:
A hard link is the file system representation of a file by which more than one path references a single file in the same volume. To create a hard link, use the CreateHardLink function. Any changes to that file are instantly visible to applications that access it through the hard links that reference it. However, the directory entry size and attribute information is updated only for the link through which the change was made.