1link(1M)                System Administration Commands                link(1M)
2
3
4

NAME

6       link, unlink - link and unlink files and directories
7

SYNOPSIS

9       /usr/sbin/link  existing-file new-file
10
11
12       /usr/xpg4/bin/link  existing-file new-file
13
14
15       /usr/sbin/unlink file
16
17

DESCRIPTION

19       The  link  and  unlink  commands link and unlink files and directories.
20       Only super-users can use these commands on directories.
21
22
23       Use link to create a new file that points  to  an  existing  file.  The
24       existing-file  and   new-file  operands   specify the existing file and
25       newly-created files.  See OPERANDS.
26
27
28       link and  unlink directly  invoke  the  link(2)  and  unlink(2)  system
29       calls,  performing  exactly what they are told to do and abandoning all
30       error checking. This differs from the  ln(1) command. See  ln(1).
31
32
33       While linked files and directories can be removed using unlink,  it  is
34       safer to use rm(1) and rmdir(1) instead. See  rm(1) and  rmdir(1).
35
36   /usr/xpg4/bin/link
37       If  the existing file being hard linked is itself a symbolic link, then
38       the newly created file (new-file) will be a hard link to the file  ref‐
39       erenced  by  the  symbolic link, not to the symbolic link object itself
40       (existing-file).
41

OPERANDS

43       The following operands are supported:
44
45       existing-file    Specifies the name of the existing file to be linked.
46
47
48       file             Specifies the name of the file to be unlinked.
49
50
51       new-file         Specifies the name of newly created (linked) file.
52
53

ENVIRONMENT VARIABLES

55       See  environ(5) for descriptions of the following environment variables
56       that  affect  the  execution  of  link: LANG, LC_ALL, LC_CTYPE, LC_MES‐
57       SAGES, and NLSPATH.
58

ATTRIBUTES

60       See attributes(5) for descriptions of the following attributes:
61
62
63
64
65       ┌─────────────────────────────┬─────────────────────────────┐
66       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
67       ├─────────────────────────────┼─────────────────────────────┤
68       │Availability                 │SUNWcsu                      │
69       └─────────────────────────────┴─────────────────────────────┘
70
71   /usr/xpg4/bin/link
72       ┌─────────────────────────────┬─────────────────────────────┐
73       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
74       ├─────────────────────────────┼─────────────────────────────┤
75       │Availability                 │SUNWxcu4                     │
76       ├─────────────────────────────┼─────────────────────────────┤
77       │Interface Stability          │Standard                     │
78       └─────────────────────────────┴─────────────────────────────┘
79

SEE ALSO

81       ln(1), rm(1),  link(2),  unlink(2),  attributes(5),  environ(5),  stan‐
82       dards(5)
83
84
85
86SunOS 5.11                        9 Oct 2002                          link(1M)
Impressum