Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ link(2) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

symlink(2)

unlink(2)




link(2) link(2)
NAME link - provides a link to a file SYNOPSIS int link(path1, path2) char *path1, *path2; DESCRIPTION link creates a new link (directory entry) for an existing file. path1 points to a pathname naming an existing file. path2 points to a pathname naming the new directory entry to be created. STATUS MESSAGES AND VALUES Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error. The link program will fail and no link will be created if one or more of the following is true: ENOTDIR A component of either path prefix is not a directory. ENAMETOOLONG A component of a pathname exceeded NAME_MAX characters, or an entire pathname exceeded PATH_MAX. ELOOP Too many symbolic links were encountered in translating a pathname. ENOENT A component of either path prefix does not exist. EACCES A component of either path prefix denies search permission. ENOENT The file named by path1 does not exist. EEXIST The link named by path2 exists. EPERM The file named by path1 is a directory and the effective user ID is not the superuser. EXDEV The link named by path2 and the file named by path1 are on different logical devices (file systems). January 1992 1



link(2) link(2)
ENOENT path2 points to a null pathname. EACCES The requested link requires writing in a directory with a mode that denies write permission. EROFS The requested link requires writing in a directory on a read-only file system. EFAULT path points outside the allocated address space of the process. EMLINK The maximum number of links to a file would be exceeded. SEE ALSO symlink(2), unlink(2) 2 January 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026