Symbolic links are a basic system management tool for *nix systems. A new version of crucial software will often get installed in parallel with the previous versions so the sysadmin can switch between versions by updating the symbolic link. Windows systems can be managed the same way, you just have to know the tricks.
First, you'll want the Windows Resource Kit. If you're doing Windows system administration for a living, you likely don't need to be told this, let alone why. However, for the purposes of this article, you want it for the linkd.exe program. If, for some reason, you won't or can't use the Windows Resource Kit, go get the SysInternals Junction tool. It does the same thing as linkd, and the source code is available if you want it.
Next, get up to speed on the Windows terminology for symbolic links. Under *nix, a link is a link. Under Windows, a link is either a "junction" or a "hardlink," depending on whether it is a directory or a file, respectively. (For more information that you ever really wanted on the subject, see this article at shell-shocked.org. It includes links to other software that manages these kinds of things.) So, junction = directory, hardlink = file. Got it? Good.
To create or delete a junction, you use the linkd.exe program from the Resource Kit. Note that you must use this program to remove the junction, otherwise you will get all sorts of odd behavior and mysteriously disappearing data (again, see the shell-shocked.org article for more info).
Here are the commands to create junctions and hardlinks using the Microsoft tools. Naturally, the commands and syntax you use will be different if you're using the SysInternals tool or some other software.
Create a junction to "target" with the name "linkname":
linkd linkname target
Safely delete a junction named "linkname":
linkd linkname /d
Create a hardlink to "targetfile" with the name "linkfile":
fsutil hardlink create linkfile targetfile
To delete hardlinks, use the usual commands like you would for any normal file.
Recent comments
29 weeks 2 days ago
47 weeks 1 day ago
1 year 32 weeks ago
1 year 32 weeks ago
1 year 44 weeks ago
2 years 18 weeks ago
3 years 32 weeks ago
3 years 37 weeks ago
3 years 39 weeks ago
3 years 42 weeks ago