2 .\" Copyright 1989 AT&T
3 .\" Copyright (c) 2002Sun Microsystems, Inc. All Rights Reserved.
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH LINK 1M "Oct 9, 2002"
9 link, unlink \- link and unlink files and directories
13 \fB/usr/sbin/link \fR \fIexisting-file\fR \fInew-file\fR
18 \fB/usr/xpg4/bin/link \fR \fIexisting-file\fR \fInew-file\fR
23 \fB/usr/sbin/unlink\fR \fIfile\fR
29 The \fBlink\fR and \fBunlink\fR commands link and unlink files and directories.
30 Only super-users can use these commands on directories.
33 Use \fBlink\fR to create a new file that points to an existing file. The
34 \fIexisting-file\fR and \fInew-file\fR operands specify the existing file and
35 newly-created files. See \fBOPERANDS\fR.
38 \fBlink\fR and \fBunlink\fR directly invoke the \fBlink\fR(2) and
39 \fBunlink\fR(2) system calls, performing exactly what they are told to do and
40 abandoning all error checking. This differs from the \fBln\fR(1) command. See
44 While linked files and directories can be removed using \fBunlink\fR, it is
45 safer to use \fBrm\fR(1) and \fBrmdir\fR(1) instead. See \fBrm\fR(1) and
47 .SS "/usr/xpg4/bin/link"
50 If the existing file being hard linked is itself a symbolic link, then the
51 newly created file (\fInew-file\fR) will be a hard link to the file referenced
52 by the symbolic link, not to the symbolic link object itself
53 (\fIexisting-file\fR).
57 The following operands are supported:
61 \fB\fIexisting-file\fR\fR
64 Specifies the name of the existing file to be linked.
73 Specifies the name of the file to be unlinked.
82 Specifies the name of newly created (linked) file.
85 .SH ENVIRONMENT VARIABLES
88 See \fBenviron\fR(5) for descriptions of the following environment variables
89 that affect the execution of \fBlink\fR: \fBLANG\fR, \fBLC_ALL\fR,
90 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
94 See \fBattributes\fR(5) for descriptions of the following attributes:
95 .SS "/usr/xpg4/bin/link"
103 ATTRIBUTE TYPE ATTRIBUTE VALUE
105 Interface Stability Standard
111 \fBln\fR(1), \fBrm\fR(1), \fBlink\fR(2), \fBunlink\fR(2), \fBattributes\fR(5),
112 \fBenviron\fR(5), \fBstandards\fR(5)