Move /var/svc/log to /var/log/svc
[unleashed/lotheac.git] / share / man / man8 / link.8
blob929a3823cfdb5e4efed573b2916d0afe02c7955f
1 '\" te
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"
8 .SH NAME
9 link, unlink \- link and unlink files and directories
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fB/usr/bin/link \fR \fIexisting-file\fR \fInew-file\fR
14 .fi
16 .LP
17 .nf
18 \fB/usr/sbin/unlink\fR \fIfile\fR
19 .fi
21 .SH DESCRIPTION
22 .sp
23 .LP
24 The \fBlink\fR and \fBunlink\fR commands link and unlink files and directories.
25 Only super-users can use these commands on directories.
26 .sp
27 .LP
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.
31 .sp
32 .LP
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
36 \fBln\fR(1).
37 .sp
38 .LP
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
41 \fBrmdir\fR(1).
42 .sp
43 .LP
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).
48 .SH OPERANDS
49 .sp
50 .LP
51 The following operands are supported:
52 .sp
53 .ne 2
54 .na
55 \fB\fIexisting-file\fR\fR
56 .ad
57 .RS 17n
58 Specifies the name of the existing file to be linked.
59 .RE
61 .sp
62 .ne 2
63 .na
64 \fB\fIfile\fR\fR
65 .ad
66 .RS 17n
67 Specifies the name of the file to be unlinked.
68 .RE
70 .sp
71 .ne 2
72 .na
73 \fB\fInew-file\fR\fR
74 .ad
75 .RS 17n
76 Specifies the name of newly created (linked) file.
77 .RE
79 .SH ENVIRONMENT VARIABLES
80 .sp
81 .LP
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.
85 .SH ATTRIBUTES
86 .sp
87 .LP
88 See \fBattributes\fR(5) for descriptions of the following attributes:
89 .SS "/usr/bin/link"
90 .sp
92 .sp
93 .TS
94 box;
95 c | c
96 l | l .
97 ATTRIBUTE TYPE  ATTRIBUTE VALUE
99 Interface Stability     Standard
102 .SH SEE ALSO
105 \fBln\fR(1), \fBrm\fR(1), \fBlink\fR(2), \fBunlink\fR(2), \fBattributes\fR(5),
106 \fBenviron\fR(5), \fBstandards\fR(5)