利用mklink节省磁盘空间
he
mklink
command in Windows is used to create symbolic links (also known as symlinks), hard links, or directory junctions. These links act as pointers to other files or directories, allowing you to access them from a different location as if they were there.Windows 中的 mklink 命令用于创建符号链接 (也称为 symlink)、硬链接或目录连接。这些链接充当指向其他文件或目录的指针,允许您从其他位置访问它们,就好像它们就在那里一样。
In your specific command,
mklink /D "C:\Users\CrowF\.vscode" "D:\software\cache\"
, you are using the/D
switch. This switch indicates that you are creating a directory symbolic link.在您的具体命令 mklink /D “C:\Users\CrowF.vscode” “D:\software\cache" 中 ,您使用了 /D 开关。此开关表示您正在创建目录符号链接 。
Here’s a breakdown of what your command does:
mklink
: The command to create a link.
mklink :创建链接的命令。/D
: Specifies that the link being created is for a directory.
/D :指定正在创建的链接用于目录。"C:\Users\CrowF\.vscode"
: This is the link name or the path where the symbolic link will be created. In this case, it’s creating a link in your.vscode
folder.
“C:\Users\CrowF.vscode” :这是链接名称或将创建符号链接的路径。在本例中,它将在 .vscode 文件夹中创建一个链接。"D:\software\cache\"
: This is the target path. The symbolic link atC:\Users\CrowF\.vscode
will point to this directory.
“D:\software\cache" :这是目标路径。C :\Users\CrowF.vscode 的符号链接将指向此目录。
Essentially, this command makes your .vscode
folder on the C: drive act as a shortcut to the D:\software\cache\
directory. This is often used to save space on the C: drive or to redirect application data to a larger storage location.
本质上,此命令使 C: 盘上的 .vscode 文件夹充当 D:\software\cache\ 目录的快捷方式。 这通常用于节省 C: 盘空间或将应用程序数据重定向到更大的存储位置。