.TH SYMLINK 2 2/13/83 .SH NAME symlink \- make symbolic link to a file .SH SYNOPSIS .nf .ft B symlink(name1, name2) char *name1, *name2; .fi .ft R .SH DESCRIPTION A symbolic link to .I name1 is created; the link is the file .IR name2 , containing the string \fIname1\fP. Either name may be an arbitrary path name; the files need not be on the same file system. .SH "RETURN VALUE Upon successful completion, a zero value is returned. If an error occurs, the error code is stored in \fIerrno\fP and a \-1 value is returned. .SH "ERRORS The symbolic link is made unless on or more of the following are true: .TP 15 [EPERM] Either .I name1 or .I name2 contains a non-ASCII character. .TP 15 [ENOENT] One of the pathnames specified was too long. .TP 15 [ENOTDIR] A component of the \fIname2\fP prefix is not a directory. .TP 15 [EEXIST] \fIName2\fP already exists. .TP 15 [EACCES] A component of the \fIname2\fP path previx denies search permission. .TP 15 [EROFS] The file \fIname2\fP would reside on a read-only file system. .TP 15 [EFAULT] .I Name1 or .I name2 points outside the process's allocated address space. .TP 15 [ELOOP] Too may symbolic links were encountered in translating the pathname. .SH "SEE ALSO" link(2), ln(1), unlink(2)