找回密码
 注册
搜索
[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
查看: 22534|回复: 2

[其他] 文件夹硬连接junction

[复制链接]
发表于 2009-10-20 20:30:38 | 显示全部楼层 |阅读模式
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

http://bcn.bathome.net/s/tool/index.html?key=junction
发表于 2009-10-20 22:32:24 | 显示全部楼层
能翻译一下吗?这样的标题也算违规,应该修改下。

[ 本帖最后由 pusofalse 于 2009-10-20 22:33 编辑 ]
发表于 2009-10-21 17:35:23 | 显示全部楼层
没有四级的英语是看不懂哦。
    迷茫~~~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|批处理之家 ( 渝ICP备10000708号 )

GMT+8, 2026-3-17 06:48 , Processed in 0.018422 second(s), 8 queries , File On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表