什么是符号链接与及怎么创建
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了什么是符号链接与及怎么创建相关的知识,希望对你有一定的参考价值。
引用来自:https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/
Windows 10,8,7and Vista 都支持符号链接(symbolic link),即著名的symlinks-它指向你系统中的文件或者文件夹,你能创建他们使用这个命令行(command prompt ,admin priviledge)或者第三方工具叫做LINK SHELL Extension
EXCERPt:
What Are Symbolic Links?
Symbolic links are basically advanced shortcuts. Create a symbolic link to an individual file or folder, and that link will appear to be the same as the file or folder to Windows—even though it’s just a link pointing at the file or folder.
使用命令行怎么创建符号链接:
Without any extra options, mklink
creates a symbolic link to a file. The below command creates a symbolic, or “soft”, link at Link
pointing to the file Target
:
mklink Link Target
Use /D when you want to create a soft link pointing to a directory. like so:
mklink /D Link Target
Use /H when you want to create a hard link pointing to a file:
mklink /H Link Target
Use /J to create a hard link pointing to a directory, also known as a directory junction:
mklink /J Link Target
So, for example, if you wanted to create a hard link at C:\LinkToFolder that pointed to C:\Users\Name\OriginalFolder, you’d run the following command:
mklink /J C:\LinkToFolder C:\Users\Name\OriginalFolder
You’ll need to put quotation marks around paths with spaces. For example, if the folders are instead named C:\Link To Folder and C:\Users\Name\Original Folder, you’d use the following command instead:
mklink /J "C:\Link To Folder" "C:\Users\Name\Original Folder"
If you see the message “You do not have sufficient privilege to perform this operation.”, you need to launch the Command Prompt as Administrator before running the command.
还有第三方工具用法查看原文:
以上是关于什么是符号链接与及怎么创建的主要内容,如果未能解决你的问题,请参考以下文章
vscode用啥符号把某一段代码包起来,类似C#的#region?