算是个新鲜东西,解释一下:
符号链接是为了方便文件/目录操作。简单的说就像窗玻璃,完全透明,软件透过它来访问真实目录。
详尽的解说请看这里:
http://www.rainux.org/2004/12/22/18
http://windows-vista.highdiy.com/index.php/symbolic-link/
(保证都是最初发布点)
=========================
我们来举个实际应用的例子:
Firefox官方版只能把配置放到%AppData%\Mozilla下,万一系统盘被毁就惨了~
注意,FAT文件系统不支持符号链接。
1.首先把%AppData%\Mozilla的东西整体挪窝到目的地,如D:\Browser\Firefox\settings。
2.删除目录%AppData%\Mozilla
3.命令行下junction创建一个符号链接:
C:\>junction "%AppData%\Mozilla" "D:\Browser\Firefox\settings"
Junction v1.04 - Windows junction creator and reparse point viewer
Copyright (C) 2000-2005 Mark Russinovich
Systems Internals - http://www.sysinternals.com
Created: C:\Documents and Settings\Administrator\Application Data\Mozilla
Targetted at: D:\Browser\Firefox\settings
4.完成了。现在看看%AppData%\Mozilla的内容,
是不是和D:\Browser\Firefox\settings里一模一样?^_^
=========================
为什么要找Sysinternals旧版?
微软的所谓新版本首次使用要人同意许可协议+乱写注册表:
http://www.microsoft.com/technet/sysinternals/FileAndDisk/Junction.mspx
%AppData%是什么?一个环境变量,指代你的应用程序目录。例如:
"%AppData%" = "C:\Documents and Settings\Administrator\Application Data"
Last edited by airosp on 2007-4-12 at 08:27 PM ]
It's something new. Let's explain:
Symbolic links are for facilitating file/directory operations. Simply put, it's like window glass, completely transparent, and software accesses the real directory through it.
For detailed explanations, please see here:
http://www.rainux.org/2004/12/22/18
http://windows-vista.highdiy.com/index.php/symbolic-link/
(Guaranteed to be the original release points)
=========================
Let's take a practical application example:
The official version of Firefox can only place configurations in %AppData%\Mozilla. It would be terrible if the system drive is destroyed~
Note that the FAT file system does not support symbolic links.
1. First, move the entire contents of %AppData%\Mozilla to the destination, such as D:\Browser\Firefox\settings.
2. Delete the directory %AppData%\Mozilla
3. Create a symbolic link using junction in the command line:
C:\>junction "%AppData%\Mozilla" "D:\Browser\Firefox\settings"
Junction v1.04 - Windows junction creator and reparse point viewer
Copyright (C) 2000-2005 Mark Russinovich
Systems Internals - http://www.sysinternals.com
Created: C:\Documents and Settings\Administrator\Application Data\Mozilla
Targetted at: D:\Browser\Firefox\settings
4. Done. Now, check the contents of %AppData%\Mozilla.
Is it exactly the same as the contents in D:\Browser\Firefox\settings? ^_^
=========================
Why look for the old version of Sysinternals?
Microsoft's so-called new version first requires people to agree to the license agreement + randomly writes to the registry:
http://www.microsoft.com/technet/sysinternals/FileAndDisk/Junction.mspx
What is %AppData%? An environment variable, referring to your application directory. For example:
"%AppData%" = "C:\Documents and Settings\Administrator\Application Data"
Last edited by airosp on 2007-4-12 at 08:27 PM ]