LINK(2)
NAME
link − link to a file
SYNOPSIS
link(name1, name2)
char *name1, *name2;
DESCRIPTION
A link to name1 is created; the link has the name name2. Either name may be an arbitrary path name.
DIAGNOSTICS
Link will fail and no link will be created if:
[EACCES] A component of either path prefix denies search permission.
[EACCES] The requested link requires writing in a directory with a mode that denies write permission.
[EEXIST] A file by the same name already exists.
[EFAULT] One of the path names specified is outside the process’s allocated address space.
[ENFILE] Insufficient system space to contain i-node.
[ENOTDIR] A path prefix component is not a directory.
[ENOENT] A path prefix component does not exist.
[ENOENT] The file named by name1 does not exist.
[EPERM] The file named by name1 is a directory and the effective user ID is not the superuser.
[EROFS] The requested link requires writing in a directory on a read-only file system.
[EXDEV] The link named by name2 and the file named by name1 are on different file systems.
[E2BIG] The argument count exceeded "ncargs".
SEE ALSO
ASSEMBLER
(link = 9.)
sys link; name1; name2