|
|
1.1 root 1: .\" Copyright (c) 1983 The Regents of the University of California.
2: .\" All rights reserved.
3: .\"
4: .\" Redistribution and use in source and binary forms are permitted provided
5: .\" that: (1) source distributions retain this entire copyright notice and
6: .\" comment, and (2) distributions including binaries display the following
7: .\" acknowledgement: ``This product includes software developed by the
8: .\" University of California, Berkeley and its contributors'' in the
9: .\" documentation or other materials provided with the distribution and in
10: .\" all advertising materials mentioning features or use of this software.
11: .\" Neither the name of the University nor the names of its contributors may
12: .\" be used to endorse or promote products derived from this software without
13: .\" specific prior written permission.
14: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
15: .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
16: .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17: .\"
18: .\" @(#)symlink.2 6.5 (Berkeley) 6/23/90
19: .\"
20: .TH SYMLINK 2 "June 23, 1990"
21: .UC 5
22: .SH NAME
23: symlink \- make symbolic link to a file
24: .SH SYNOPSIS
25: .nf
26: .ft B
27: symlink(name1, name2)
28: char *name1, *name2;
29: .fi
30: .ft R
31: .SH DESCRIPTION
32: A symbolic link
33: .I name2
34: is created to
35: .IR name1
36: (\fIname2\fP is the name of the
37: file created, \fIname1\fP is the string
38: used in creating the symbolic link).
39: Either name may be an arbitrary path name; the files need not
40: be on the same file system.
41: .SH "RETURN VALUE
42: Upon successful completion, a zero value is returned.
43: If an error occurs, the error code is stored in \fIerrno\fP
44: and a \-1 value is returned.
45: .SH "ERRORS
46: The symbolic link is made unless on or more of the
47: following are true:
48: .TP 15
49: [ENOTDIR]
50: A component of the \fIname2\fP prefix is not a directory.
51: .TP 15
52: [EINVAL]
53: Either \fIname1\fP or \fIname2\fP
54: contains a character with the high-order bit set.
55: .TP 15
56: [ENAMETOOLONG]
57: A component of either pathname exceeded 255 characters,
58: or the entire length of either path name exceeded 1023 characters.
59: .TP 15
60: [ENOENT]
61: The named file does not exist.
62: .TP 15
63: [EACCES]
64: A component of the \fIname2\fP path prefix denies search permission.
65: .TP 15
66: [ELOOP]
67: Too many symbolic links were encountered in translating the pathname.
68: .TP 15
69: [EEXIST]
70: \fIName2\fP already exists.
71: .TP 15
72: [EIO]
73: An I/O error occurred while making the directory entry for \fIname2\fP,
74: or allocating the inode for \fIname2\fP,
75: or writing out the link contents of \fIname2\fP.
76: .TP 15
77: [EROFS]
78: The file \fIname2\fP would reside on a read-only file system.
79: .TP 15
80: [ENOSPC]
81: The directory in which the entry for the new symbolic link is being placed
82: cannot be extended because there is no space left on the file
83: system containing the directory.
84: .TP 15
85: [ENOSPC]
86: The new symbolic link cannot be created because there
87: there is no space left on the file
88: system that will contain the symbolic link.
89: .TP 15
90: [ENOSPC]
91: There are no free inodes on the file system on which the
92: symbolic link is being created.
93: .TP 15
94: [EDQUOT]
95: The directory in which the entry for the new symbolic link
96: is being placed cannot be extended because the
97: user's quota of disk blocks on the file system
98: containing the directory has been exhausted.
99: .TP 15
100: [EDQUOT]
101: The new symbolic link cannot be created because the user's
102: quota of disk blocks on the file system that will
103: contain the symbolic link has been exhausted.
104: .TP 15
105: [EDQUOT]
106: The user's quota of inodes on the file system on
107: which the symbolic link is being created has been exhausted.
108: .TP 15
109: [EIO]
110: An I/O error occurred while making the directory entry or allocating the inode.
111: .TP 15
112: [EFAULT]
113: .I Name1
114: or
115: .I name2
116: points outside the process's allocated address space.
117: .SH "SEE ALSO"
118: link(2), ln(1), unlink(2)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.