批处理之家's Archiver

小勇12 发表于 2009-10-20 20:30

文件夹硬连接junction

Junction v1.05
By Mark Russinovich
Published: July 24, 2007
Download Junction (41 KB)
Introduction
Windows 2000 and higher supports directory symbolic links, where a directory serves as a symbolic link to another directory on the computer. For example, if the directory D:\SYMLINK specified C:\WINNT\SYSTEM32 as its target, then an application accessing D:\SYMLINK\DRIVERS would in reality be accessing C:\WINNT\SYSTEM32\DRIVERS. Directory symbolic links are known as NTFS junctions in Windows. Unfortunately, Windows comes with no tools for creating junctions—you have to purchase the Win2K Resource Kit, which comes with the linkd program for creating junctions. I therefore decided to write my own junction-creating tool: Junction. Junction not only allows you to create NTFS junctions, it allows you to see if files or directories are actually reparse points. Reparse points are the mechanism on which NTFS junctions are based, and they are used by Windows' Remote Storage Service (RSS), as well as volume mount points.
Please read this Microsoft KB article for tips on using junctions.
Note that Windows does not support junctions to directories on remote shares.
If you want to view reparse information, the usage for Junction is the following:

Using Junction
Use junction to list junctions:
Usage: [-s] <directory or file name>
-s    Recurse subdirectories
Examples:
To determine if a file is a junction, specify the file name

junction c:\test

To list junctions beneath a directory, include the –s switch:

junction -s c:\

To create a junction c:\Program-Files for "c:\Program Files":

C:\>md Program-Files

C:\>junction c:\Program-Files "c:\Program Files"

To delete a junction, use the –d switch:

创建文件夹硬连接
md Program-Files
junction c:\Program  "c:\Program Files"
文件夹硬连接查询与删除方法1
junction c:\test
junction -s c:\ (递归查询整个C:)
junction -d c:\Program-Files
文件夹硬连接查询与删除方法2
fsutil reparsepoint query 文件夹
fsutil reparsepoint delete 文件夹

有点类似. HardLink
NTFS的一大特性。在XP下可以通过 fsutil 建立(需要管理员权限)。
fsutil hardlink create
例如 : fsutil hardlink create c:\foo.txt c:\bar.txt

junction -d c:\Program-Files

[url]http://bcn.bathome.net/s/tool/index.html?key=junction[/url]

pusofalse 发表于 2009-10-20 22:32

能翻译一下吗?这样的标题也算违规,应该修改下。

[[i] 本帖最后由 pusofalse 于 2009-10-20 22:33 编辑 [/i]]

lovemmls 发表于 2009-10-21 17:35

没有四级的英语是看不懂哦。
    迷茫~~~

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.