BSD 4_1_snap development
[unix-history] / usr / man / man2 / link.2
CommitLineData
e3758c96
C
1.TH LINK 2
2.UC 4
3.SH NAME
4link \- link to a file
5.SH SYNOPSIS
6.nf
7.B link(name1, name2)
8.B char *name1, *name2;
9.fi
10.SH DESCRIPTION
11A link
12to
13.I name1
14is created;
15the link has the name
16.IR name2 .
17Either name may be an arbitrary path name.
18.SH "SEE ALSO"
19ln(1), unlink(2)
20.SH DIAGNOSTICS
21Zero is returned when a link is made;
22\-1 is returned when
23.I name1
24cannot be found; when
25.I name2
26already exists; when the directory of
27.I name2
28cannot be written; when
29an attempt is made to link to a directory by a user
30other than the super-user;
31when an attempt is made to link
32to a file on another file system;
33when a file has too many links.
34.PP
35On some systems
36the super-user may link
37to non-ordinary files.
38.SH "ASSEMBLER (PDP-11)"
39(link = 9.)
40.br
41.B sys link; name1; name2