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目錄 - -