windows中的符号链接( MKLINK 命令 ) 在Windows XP下创建目录的符号链接

http://technet.microsoft.com/en-us/sysinternals/bb896768


Junction v1.06

By Mark Russinovich

Published: September 8, 2010

Download Junction
(77.7 KB)

Rate:

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.

Notethat 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]

-sRecurse 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:

junction -d c:\Program-Files


No

Download Junction
(77.7 KB)


http://apps.hi.baidu.com/share/detail/32686041

windows中的符号链接( MKLINK 命令 ) 在Windows XP下创建目录的符号链接 J...

创建符号链接。

MKLINK [[/D] | [/H] | [/J]] Link Target

/D 创建目录符号链接。黙认为文件
符号链接。
/H 创建硬链接,而不是符号链接。
/J 创建目录联接。
Link 指定新的符号链接名称。
Target 指定新链接引用的路径
(相对或绝对)。

在Windows XP下创建目录的符号链接

文章分类:操作系统 关键字: windows 符号链接


因为开发一个项目,需要类似linux的ln -s 一样创建一个目录的快捷方式。但是windows xp下没有比较好的方法。于是google发现了这个小东西。Junction.

详见 http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx

一句话,Junction 就是windows下的ln -s.

用法:

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:

junction -d c:\Program-Files

下载附件解到c:\wondows\system32下。执行上面的命令。即可。




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值