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 8 "Oct 25, 2017"
9 link, unlink \- link and unlink files and directories
13 \fB/usr/bin/link \fR \fIexisting-file\fR \fInew-file\fR
18 \fB/usr/sbin/unlink\fR \fIfile\fR
24 The \fBlink\fR and \fBunlink\fR commands link and unlink files and directories.
25 Only super-users can use these commands on directories.
28 Use \fBlink\fR to create a new file that points to an existing file. The
29 \fIexisting-file\fR and \fInew-file\fR operands specify the existing file and
30 newly-created files. See \fBOPERANDS\fR.
33 \fBlink\fR and \fBunlink\fR directly invoke the \fBlink\fR(2) and
34 \fBunlink\fR(2) system calls, performing exactly what they are told to do and
35 abandoning all error checking. This differs from the \fBln\fR(1) command. See
39 While linked files and directories can be removed using \fBunlink\fR, it is
40 safer to use \fBrm\fR(1) and \fBrmdir\fR(1) instead. See \fBrm\fR(1) and
44 If the existing file being hard linked is itself a symbolic link, then the
45 newly created file (\fInew-file\fR) will be a hard link to the file referenced
46 by the symbolic link, not to the symbolic link object itself
47 (\fIexisting-file\fR).
51 The following operands are supported:
55 \fB\fIexisting-file\fR\fR
58 Specifies the name of the existing file to be linked.
67 Specifies the name of the file to be unlinked.
76 Specifies the name of newly created (linked) file.
79 .SH ENVIRONMENT VARIABLES
82 See \fBenviron\fR(5) for descriptions of the following environment variables
83 that affect the execution of \fBlink\fR: \fBLANG\fR, \fBLC_ALL\fR,
84 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
88 See \fBattributes\fR(5) for descriptions of the following attributes:
97 ATTRIBUTE TYPE ATTRIBUTE VALUE
99 Interface Stability Standard
105 \fBln\fR(1), \fBrm\fR(1), \fBlink\fR(2), \fBunlink\fR(2), \fBattributes\fR(5),
106 \fBenviron\fR(5), \fBstandards\fR(5)