How to Make or Create Symbolic Link in Unix or Linux如何使或创建符号链接在Unix或Linux

Symbolic link (also known as symlink or soft link) is a special type of file that has reference that points to another file or directory, in the form of an absolute or relative path.符号链接(也称为符号链接或软链接)是一种特殊类型的文件,参考点到另一文件或目录的形式,绝对或相对路径。 Symbolic link can be used just like the target original file or folder, as it merely contains a text string that is interpreted and followed by the operating system to another file or directory.符号链接可用于就像原始的目标文件或文件夹,因为它仅仅包含一个文本字符串是解释和所遵循的操作系统,另一文件或目录。

Symbolic link is supported on most Unix-like (including Linux) operating systems, Windows Vista (see符号链接是最支持类Unix (包括Linux )操作系统, Windows Vista中(见 Windows Vista symbolic link, hard link and junction point Windows Vista的符号链接,硬链接和交界点 ) and to some degree in Windows 2000 and Windows XP. ) ,并在一定程度上Windows 2000和Windows XP 。 Although symbolic link is pointing to a target, it operates independently of its target (deletion of symbolic link does not been affected), but allows program to behave as if operating directly on the target file.虽然符号链接指向一个目标,它独立运作,其目标(删除符号链接不会受到影响) ,但允许程序表现为,如果直接操作的目标文件。

So how to create or make a symbolic link?因此,如何创建或作出一个象征性的链接? To create a symbolic, use the following command syntax:要创建一个象征性的,使用下面的命令语法:

ln -s [target directory or file] [symlink shortcut]

For example, to link the /usr/local/lib/example directory to /example, use the following command:例如,如果要联系的/ usr / local / lib目录/目录,例如/例如,使用下面的命令:

ln -s /usr/local/lib/example /example

After creating the symbolic link above, /example will point to /usr/local/lib/example, and when user changes directory (CD) to /example, OS shell will automatically change it to /usr/local/lib/example directory.在创建符号链接上述情况, /例如将指向为/ usr / local / lib目录/例如,当用户更改目录(光盘版) ,以/例如,操作系统壳会自动更改为/ usr / local / lib目录/例如目录。

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要说明:这是一台机器翻译网页这是“原样”提供,无保修。 Machine translation may be difficult to understand.机器翻译可能很难理解。 Please refer to请参阅 original English article英文原文的文章 whenever possible.只要有可能。

Share and contribute or get technical support and help at共享和贡献或获得技术支持和帮助 My Digital Life Forums 我的数字生活论坛 .



Leave a Reply留下一个回复

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> 您可以使用这些标签: href="" title="">的<a <abbr title=""> <acronym title="">的<b> <blockquote cite=""> <cite>的<code> “删除日期时间= “ ” “的<em> <i> <q cite=""> <strike>的<strong>

Subscribe to comments feature has been disabled. 订阅评论功能已被禁用。 To receive notification of latest comments posted, subscribe to 收到通知的最新评论张贴,订阅 My Digital Life Comments RSS feed 我国数字化生活的评论RSS种子 or register to receive 接收登记 new comments in daily email digest. 中新评论的电子邮件,每天消化。
Custom Search

New Articles新文章

Incoming Search Terms for the Article收到的搜索字词的文章

how to create a symbolic link in unix for a directory 如何创建一个符号链接在Unix目录 - -