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!
{{Short description|Shell command for creating a link file}} {{Lowercase title}} {{Infobox software | name = ln | logo = | screenshot = Ln-example-command.gif | screenshot size = | caption = Example usage of {{code|ln}} utility | author = [[AT&T Bell Laboratories]] | developer = Various [[open-source software|open-source]] and [[commercial software|commercial]] developers | released = {{Start date and age|1971|11|3}} | latest release version = | latest release date = | operating system = [[Unix]], [[Unix-like]], [[IBM i]] | platform = [[Cross-platform]] | genre = [[Command (computing)|Command]] | license = [[coreutils]]: [[GPLv3+]] | website = }} '''{{code|ln}}''' is a [[shell (computing)|shell]] [[command (computing)|command]] for creating a link file to an existing [[computer file|file]] or [[computer directory|directory]].<ref name=UNIXKP>{{cite book|last1=Kernighan|first1=Brian W.|last2=Pike|first2=Rob|title=The Unix programming environment.|date=1984|publisher=Prentice-Hall|location=Englewood Cliffs, N.J.|isbn=013937681X|page=[https://archive.org/details/unixprogramminge0000kern/page/59 59]|url-access=registration|url=https://archive.org/details/unixprogramminge0000kern/page/59}}</ref> By default, the command creates a [[hard link]], but with the {{code|-s}} [[Command-line interface|command line]] option, it creates a [[symbolic link]].<ref>{{cite web|title=ln - The Open Group Base Specifications Issue 7|url=http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ln.html|website=pubs.opengroup.org|publisher=The IEEE and The Open Group|access-date=7 August 2015}}</ref> Most systems disallow a hard link to a directory since such links could disrupt the structure of a [[file system]] and interfere with the operation of other utilities.<ref>{{cite web|title=Why are hard links not allowed to directories in UNIX/Linux?|url=http://unix.stackexchange.com/questions/22394/why-hard-links-not-allowed-to-directories-in-unix-linux?rq=1|website=unix.stackexchange.com|access-date=7 August 2015}}</ref> The command can create a symbolic link to non-existent file.<ref name=GNULnman /> The command appeared in Issue 2 of the [[X/Open]] Portability Guidelines.<ref name=SUS/> The version in [[GNU Core Utilities]] was written by Mike Parker and David MacKenzie.<ref>{{man|1|ln|ManKier}}</ref> The command is available in [[Windows]] via [[UnxUtils]]<ref>{{Cite web|url=http://unxutils.sourceforge.net/|title=Native Win32 ports of some GNU utilities|website=unxutils.sourceforge.net}}</ref> and has been ported to [[IBM i]].<ref>{{cite web |title=IBM System i Version 7.2 Programming Qshell |language=en |author=IBM |website=[[IBM]] |author-link=IBM |url=https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzahz/rzahzpdf.pdf?view=kc |access-date=2020-09-05 }}</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)