Syntax | #include <unistd.h> int symlink(const char *path1,, const char *path2); | |
Description |
The file to which the symbolic link points is used when an The When the value | |
Return val. | 0 | if successful. |
-1 | if an error occurs; | |
Errors |
| |
|
| Search permission is denied for the directory in which the symbolic link was created. Search permission is denied for a component of the path prefix of path2. |
|
| The file or symbolic link specified using path2 already exists. |
|
| A component of the path prefix of path2 is not a directory. |
|
| An I/O error occurred while reading from or writing to the file system. |
|
| Too many symbolic links were encountered in resolving path2. |
| ||
The length of the path1 or path2 argument exceeds | ||
| A component of the pathname prefix of path2 does not exist or path2 is an empty string. | |
| The directory in which the entry for the new symbolic link is to be created cannot be extended because there is no space left on the file system containing the directory. The new symbolic link cannot be created because there is no space left on the file system which will contain the link. There are no free inodes on the file system on which the file is to be created. | |
| The new symbolic link would reside on a read-only file system. | |
Extension | ||
| The directory in which the entry for the new symbolic link is to be placed cannot be extended because the maximum number of disk blocks allocated to the user (i.e. the user’s quota) on the file system was exceeded. The new symbolic link cannot be created because the user's quota of disk blocks on the file system that is to contain the link was exceeded. The user's quota of inodes on the file system on which the file is to be created was exceeded. | |
| path1 or path2 points outside the allocated address space for the process. | |
| The file system does not support symbolic links. (End) | |
In addition, | ||
| The file descriptor fd was not opened with | |
| The path2 parameter does not specify an absolute pathname, and the fd parameter does not have the value | |
| The path2 parameter does not specify an absolute pathname, and the file descriptor fd is not connected with a directory. | |
Notes |
| |
See also |
|