Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Ln (Unix)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Links== A link allows more than one [[file path|path]] to refer to the same file. A hard link is a directory entry that refers to a file's [[inode]] (an internal [[Reference (computer science)|reference]]). A file can have multiple hard links {{endash}} each referring to the same [[inode]].<ref name=libc /> Creating a hard link does not copy the contents of the file; but merely causes another name to be associated with the same content. When a hard link is created for a file, a [[Reference counting#File systems|counter]] in its inode is incremented, and removing a hard link results in decrementing the counter. A file is not deleted (to allow reusing its storage space) until its reference count reaches zero.<ref name=UNIXKP /><ref name=IBMInode>{{cite web|title=Speaking UNIX: It is all about the inode|url=http://www.ibm.com/developerworks/aix/library/au-speakingunix14/|website=ibm.com|publisher=IBM developerWorks|access-date=7 August 2015}}</ref> A hard link can only refer to an object on the same [[file system]].<ref>{{cite book|last1=Bovet|first1=Daniel P.|last2=Cesati|first2=Marco|title=Understanding the Linux Kernel|date=2005|publisher=Safari Tech Books Online|location=Boston, MA|isbn=0596005652|page=14|edition=3rd}}</ref> A symbolic link refers to another file by its path (a symbolic reference).<ref name=GNULnman>{{cite web|title=GNU Coreutils: ln invocation|url=https://www.gnu.org/software/coreutils/manual/html_node/ln-invocation.html|website=gnu.org|publisher=Free Software Foundation, Inc.|access-date=7 August 2015}}</ref> When encountered during pathname resolution, modify the [http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13 pathname resolution] to be taken to the location which the symbolic link contains. The content of a symbolic link is the target path, which can also be examined via the {{code|readlink}} command.<ref>{{cite web|title=readlink(1) - Linux man page|url=http://linux.die.net/man/1/readlink|website=linux.die.net|access-date=7 August 2015|ref=ReadlinkMan}}</ref> A symbolic link may specify a path that does not refer to an existing file. Resolving such a symbolic link will fail until a file is created at its specified path. Also, a symbolic link to an existing file will fail to resolve if the file is moved.<ref name=libc>{{cite book|last1=Loosemore|first1=Sandra|last2=Stallman|first2=Richard M.|last3=McGrath|first3=Roland|last4=Oram|first4=Andrew|last5=Drepper|first5=Ulrich|title=The GNU C Library Reference Manual|publisher=Free Software Foundation, Inc|page=392|url=https://www.gnu.org/software/libc/manual/pdf/libc.pdf|access-date=7 August 2015}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)