.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\" @(#)link.2 6.2 (Berkeley) %G%
link \- make a hard link to a file
must be in the same file system.
Unless the caller is the super-user,
share equal access and rights to
Upon successful completion, a value of 0 is returned. Otherwise,
a value of \-1 is returned and
is set to indicate the error.
will fail and no link will be created if one or more of the following
A component of either path prefix is not a directory.
Either pathname contains a character with the high-order bit set.
A component of either pathname exceeded 255 characters,
or entire length of either path name exceeded 1023 characters.
A component of either path prefix does not exist.
A component of either path prefix denies search permission.
The requested link requires writing in a directory with a mode
that denies write permission.
Too many symbolic links were encountered in translating one of the pathnames.
The file named by \fIname1\fP does not exist.
The link named by \fIname2\fP does exist.
The file named by \fIname1\fP is a directory and the effective
user ID is not super-user.
The link named by \fIname2\fP and the file named by \fIname1\fP
are on different file systems.
An I/O error occurred while making the directory entry.
The requested link requires writing in a directory on a read-only file
One of the pathnames specified
is outside the process's allocated address space.