This article is a mirror article of machine translation, please click here to jump to the original article.

View: 13047|Reply: 1

[windows] The folder linking function under Windows system mklink/linkd

[Copy link]
Posted on 2/22/2018 1:53:22 PM | | |
The mklink command on Vista and above systems can create a link to a folder (it feels like a map of a folder). Because the folder link is implemented from the bottom up, the link is transparent to the application.

(The corresponding function of Windows 2000, XP, Server 2003 is linkd, here is only mklink)
For example, I have a folder called C:\Program Files, but there is not much space on the c drive, so I want to transfer some applications to the d drive, but cutting it directly will definitely not work, and the application will report an error, so first move (cut) the entire C:\Program Files folder to the d drive, and then execute the command:



In this way, there will be an additional folder with a shortcut icon under the C drive, the full name is "C:\Program Files", and double-click on it to actually go to D:\Program Files.

The C:\Program Files folder is transparent to the application, that is, except for Windows itself, the application does not know that the things under C:\Program Files have actually been transferred to the D drive, and they are still on the C drive. This will not affect the use of the original application under C:\Program Files.



1. The links established above belong to soft links (/j), as well as symbolic links (/d) and hard links to files (/h).

Symlinks and softlinks are much the same, with the difference that softlinks are absolute path links, while symbolic links allow links of relative paths.

For example, if you create a symbolic link c:\1 and a soft link c:\2 of c:\data\tmp respectively, then c:\1 points to the subfolder tmp under the data folder under the same folder, and c:\2 points to the absolute path of c:\data\tmp. The effect is that if you move the two folders c:\1 and c:\2 to the D drive, the link of d:\1 will be invalid, and d:\2 will still be valid.

A hard link to a file is a link created to a file, such as c:\data\1.txt creating a link c:\data\2.txt, then these two files are two equivalent aliases of the same file, which is equivalent to two pointers to the same hard disk storage space, and deleting either of them does not affect the other file. But the limitation is that this link cannot cross partitions.

2. Soft links and symbolic links cannot cross disks.

3. This feature must be on the NTFS file system to be used.




Previous:What is gas, what is gas price, and data?
Next:Ethereum Wallet wallet geth was successfully transferred from the C drive to another disk
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com