可以理解为创建快捷方式,实体内容存在别的地方,但仍可对这个位置读取,会转到链接的位置
查看命令帮助
mklink /?
创建符号链接。 MKLINK [[/D] | [/H] | [/J]] Link Target /D 创建目录符号链接。默认为文件符号链接。 /H 创建硬链接而非符号链接。 /J 创建目录联接。 Link 指定新的符号链接名称。 Target 指定新链接引用的路径(相对或绝对)。
之前用这个命令迁移了GTA5
【mklink /d "这里填epic平台+gtav" "这里填steam平台的路径"】(注意代码里的双引号)
以我的例子得到的是(mklink /d "D:Program FilesEpic GamesGTAV" "D:Program Files (x86)SteamsteamappscommonGrand Theft Auto V"),在cmd里运行后就能生成链接到steam平台的文件夹,这样steam和epic公用一份游戏文件就成功了。
最近conda在C盘占的空间太大了,用spacesinffer看了看时envs和pkgs两个文件夹占了绝大部分,所以要把这个两个目录迁移到别的盘
原始位置
C:UsersMLGMiniConda3
迁移之后位置
H:MiniConda3
命令
MKLINK /D C:UsersMLGMiniConda3envs H:MiniConda3envs
MKLINK /D C:UsersMLGMiniConda3pkgs H:MiniConda3pkgs
参考文章: