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