📄 ln.1
字号:
.\" SCCSID: @(#)ln.1 8.1 9/11/90.TH ln 1.SH Nameln \- link to a file.SH Syntax.B ln[ \fB\-f\fR ] [ \fB\-i\fR ] [ \fB\-s\fR ] \fIname1\fR [\|\fIname2\fR\|].br.B ln[ \fB\-f\fR ] [ \fB\-i\fR ] [ \fB\-s\fR ] name ... directory.SH Description.NXR "ln command".NXR "link" "creating".NXAM "ln command" "lstat system call".NXAM "ln command" "readlink system call".NXAM "ln command" "symlink system call".NXAM "ln command" "link system call"A link is a directory entry referringto a file..NXR "link" "defined" A file, together withits size and all its protectioninformation may have several links to it.There are two kinds of links: hard links and symbolic links..PPBy default.PN lnmakes hard links.A hard link to a file is indistinguishable from theoriginal directory entry. .NXR "hard link" "defined"Any changes to a file are effective independent of the name usedto reference the file.Hard links may not span file systems and may not refer to directories..PPGiven one or two arguments,.PN lncreates a link to an existing file.IR name1 .If.I name2is given, the link has that name.The.I name2may also be a directory in which to place the link.Otherwise it is placed in the current directory.If only the directory is specified, the link is madeto the last component of.IR name1 ..PPGiven more than two arguments,.PN lnmakes links to all the named files in the named directory.The links made have the same name as the files being linked to..SH Options.NXR "ln command" "options".IP \fB\-f\fR 5 Forces existing.I destinationpathnames to be removed before linking without prompting for confirmation..IP \fB\-i\fR 5Write a prompt to standard output requesting information for each linkthat would overwrite an existing file. If the response from standard input isaffirmative, and if permissions allow, the link is done. The .B \-i option hasthis effect even if the standard input is not a terminal..IP \fB\-s\fR 5Creates a symbolic link..IPA symbolic link contains the name of the file towhich it is linked. .NXR "symbolic link"The referenced file is used when an .MS open 2operation is performed on the link.A .MS stat 2on a symbolic link returns the linked-to file. An .MS lstat 2 must be done to obtain information about the link.The .MS readlink 2call may be used to read the contents of a symbolic link.Symbolic links may span file systems and may refer to directories..SH See Alsocp(1), mv(1), rm(1), link(2), readlink(2), stat(2), symlink(2)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -