Windows: December 2011 Archives

Windows Soft Link and Hard Link

Vote 0 Votes

UNIX 系 OS 有個 ln 可建立 Soft(Symbolic) Links 及 Hard Link
Windows 下其實也有, Soft Links 就是 Junction, 在 NTFS 5.0 之後才有支援,
可使用官方工具 junction 建立
Hard Link 可使用內建工具 fsutil 建立

例: 建立 aaa 檔案 soft link bbb
C:\>junction bbb aaa

Junction v1.06 - Windows junction creator and reparse point viewer
Copyright (C) 2000-2010 Mark Russinovich
Sysinternals -

Created: C:\bbb
Targetted at: C:\aaa

例: 建立 aaa 檔案 hard link ccc
fsutil hardlink create ccc aaa
已經為 C:\ccc <<===>> C:\aaa 建立 Hardlink

dir soft link 可看到 <JUNCTION> 字樣

磁碟區 D 中的磁碟是 WinXP
磁碟區序號: C88F-CE62

D:\ 的目錄

2011/12/06 下午 11:37 <JUNCTION> bbb
2009/10/29 下午 03:57 559 aaa
2009/10/29 下午 03:57 559 ccc

ref. Hard Links and Junctions

About this Archive

This page is an archive of entries in the Windows category from December 2011.

Windows: November 2011 is the previous archive.

Windows: March 2012 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Monthly Archives