
符号链接symlink
Symbolic Links are also known as Symlinks. Symlinks are used to create a shortcut for a given file or folder. Symlinks are very useful for different purposes which also prevents copy the same data over and over again. In this tutorial, we will learn what is symlinks and how to create and use symlinks for Linux and Windows operating systems?
符号链接也称为符号链接。 符号链接用于为给定文件或文件夹创建快捷方式。 符号链接对于不同目的非常有用,这也可以防止一遍又一遍地复制相同的数据。 在本教程中,我们将学习什么是符号链接以及如何为Linux和Windows操作系统创建和使用符号链接?
符号链接类型 (Symlink Types)
There is two type of symlinks. These are called Soft and Hard. Generally, Symlink is used for Soft symbolic links which are more popular than hard links.
符号链接有两种类型。 这些分别称为“软”和“硬”。 通常,Symlink用于软符号链接,该符号链接比硬链接更流行。
软符号链接 (Soft Symlinks)
Soft links are just links they do not contain actual data. Soft symlinks can be used to point different partitions.
软链接只是它们不包含实际数据的链接。 软符号链接可用于指向不同的分区。
硬符号链接 (Hard Symlinks)
Hardlinks are used to point directly to the actual data. Hard links can not be used to point to different partitions.
硬链接用于直接指向实际数据。 硬链接不能用于指向不同的分区。
为Windows创建Symlink (Create Symlink For Windows)
Windows operating systems provide mklink
command to create the soft and hard symlink. If we want to create symlinks for paths like C:\
we generally need Administrator privileges because of these paths is a special path for users.
Windows操作系统提供mklink
命令来创建软符号链接和硬符号链接。 如果我们要为诸如C:\
类的路径创建符号链接,通常需要管理员特权,因为这些路径是用户的特殊路径。
为文件创建软符号链接 (Create Soft Symlink For File)
We can create a soft symbolic link for a file just providing the file name and symbolic link name like below. We will cre