.\" .\" Sccsid @(#)ln.1 1.11 (gritter) 2/2/05 .\" Parts taken from ln(1), Unix 7th edition: .\" Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" Redistributions of source code and documentation must retain the .\" above copyright notice, this list of conditions and the following .\" disclaimer. .\" Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed or owned by Caldera .\" International, Inc. .\" Neither the name of Caldera International, Inc. nor the names of .\" other contributors may be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA .\" INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE .\" LIABLE FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .TH LN 1 "2/2/05" "Heirloom Toolchest" "User Commands" .SH NAME ln \- make a link .SH SYNOPSIS \fBln\fR [\fB\-f\fR] [\fB\-n\fR] [\fB\-s\fR] \fIname1\fR [\fIname2\fR .\ .\ .\ ] \fItarget\fR .SH DESCRIPTION A link is a directory entry referring to a file; the same file (together with its size, all its protection information, etc.) may have several links to it. There is no way to distinguish a link to a file from its original directory entry; any changes in the file are effective independently of the name by which the file is known. .PP .B Ln creates a link named .I target to an existing file .IR name1 . If .I target is a directory, more than one name may be given, and the links are placed in that directory, with the name of the last pathname component. .PP It is forbidden to link to a directory or to link across file systems. It is, however, possible to create a .I symbolic .I link even in this case; see the .B \-s option below. .PP The .B ln command accepts the following options: .TP .B \-f If the target file exists, an attempt is made to unlink it before the new link is created, regardless of file permissions. This option is ignored with .B /usr/5bin/ln and .B /usr/5bin/s42/ln if the .I \-s option is also given. .TP .B \-n Do not remove an existing target file even if the user has write permission on it. This is the default for .B /usr/5bin/posix/ls and .BR /usr/5bin/posix2001/ls . .TP .B \-s Create a symbolic link, that is a special file containing the pathname of the target file. The system will resolve this pathname when the symbolic link is accessed. A symbolic link can refer to all types of files and span device boundaries, but will become stale if the target file is removed. An existing target file will not be overwritten. .SH "SEE ALSO" cp(1), mv(1), link(2), symlink(2)