Penguin
Annotated edit history of symlink(2) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 SYMLINK
2 !!!SYMLINK
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 RETURN VALUE
7 ERRORS
8 NOTES
9 CONFORMING TO
10 SEE ALSO
11 ----
12 !!NAME
13
14
15 symlink - make a new name for a file
16 !!SYNOPSIS
17
18
19 __#include __
20
21
22 __int symlink(const char *__''oldpath''__, const char
23 *__''newpath''__);__
24 !!DESCRIPTION
25
26
27 __symlink__ creates a symbolic link named ''newpath''
28 which contains the string ''oldpath''.
29
30
31 Symbolic links are interpreted at run-time as if the
32 contents of the link had been substituted into the path
33 being followed to find a file or directory.
34
35
36 Symbolic links may contain __..__ path components, which
37 (if used at the start of the link) refer to the parent
38 directories of that in which the link resides.
39
40
41 A symbolic link (also known as a soft link) may point to an
42 existing file or to a nonexistent one; the latter case is
43 known as a dangling link.
44
45
46 The permissions of a symbolic link are irrelevant; the
47 ownership is ignored when following the link, but is checked
48 when removal or renaming of the link is requested and the
49 link is in a directory with the sticky bit set.
50
51
52 If ''newpath'' exists it will ''not'' be
53 overwritten.
54 !!RETURN VALUE
55
56
57 On success, zero is returned. On error, -1 is returned, and
58 ''errno'' is set appropriately.
59 !!ERRORS
60
61
62 __EPERM__
63
64
65 The filesystem containing ''newpath'' does not support
66 the creation of symbolic links.
67
68
69 __EFAULT__
70
71
72 ''oldpath'' or ''newpath'' points outside your
73 accessible address space.
74
75
76 __EACCES__
77
78
79 Write access to the directory containing ''newpath'' is
80 not allowed for the process's effective uid, or one of the
81 directories in ''newpath'' did not allow search (execute)
82 permission.
83
84
85 __ENAMETOOLONG__
86
87
88 ''oldpath'' or ''newpath'' was too long.
89
90
91 __ENOENT__
92
93
94 A directory component in ''newpath'' does not exist or is
95 a dangling symbolic link, or ''oldpath'' is the empty
96 string.
97
98
99 __ENOTDIR__
100
101
102 A component used as a directory in ''newpath'' is not, in
103 fact, a directory.
104
105
106 __ENOMEM__
107
108
109 Insufficient kernel memory was available.
110
111
112 __EROFS__
113
114
115 ''newpath'' is on a read-only filesystem.
116
117
118 __EEXIST__
119
120
121 ''newpath'' already exists.
122
123
124 __ELOOP__
125
126
127 Too many symbolic links were encountered in resolving
128 ''newpath''.
129
130
131 __ENOSPC__
132
133
134 The device containing the file has no room for the new
135 directory entry.
136
137
138 __EIO__
139
140
141 An I/O error occurred.
142 !!NOTES
143
144
145 No checking of ''oldpath'' is done.
146
147
148 Deleting the name referred to by a symlink will actually
149 delete the file (unless it also has other hard links). If
150 this behaviour is not desired, use __link__.
151 !!CONFORMING TO
152
153
154 SVr4, SVID, POSIX, BSD 4.3. SVr4 documents additional error
155 codes SVr4, SVID, BSD 4.3, X/OPEN. SVr4 documents additional
156 error codes EDQUOT and ENOSYS. See open(2) re
157 multiple files with the same name, and NFS.
158 !!SEE ALSO
159
160
161 readlink(2), link(2), unlink(2),
162 rename(2), open(2), lstat(2),
163 ln(1)
164 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.