Visit Our UNIX and Linux User Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #994
Difficulty: Medium
A hypervisor or virtual machine monitor (VMM) is a computer software, firmware or hardware that creates and runs virtual machines.
True or False?
Linux & Unix Commands - Search Man Pages

readlink(2) [hpux man page]

readlink(2)							System Calls Manual						       readlink(2)

NAME
readlink() - read the contents of a symbolic link SYNOPSIS
DESCRIPTION
The function places the contents of the symbolic link referred to by path in the buffer buf which has size bufsiz. If the number of bytes in the symbolic link is less than bufsiz, the contents of the remainder of buf are unspecified. In systems conforming to AES standards, the returned string will be null-terminated if the length of the path name string is less than buf- siz. If the length of the path name string is exactly bufsiz, the string will not be null-terminated when returned. If the length of the path name string exceeds the function returns and sets to Note The kernel tunable parameter can be queried to determine whether a system conforms to AES standards. RETURN VALUE
Upon successful completion, returns the count of bytes placed in the buffer. Otherwise, it returns a value of leaves the buffer unchanged, and sets to indicate the error. ERRORS
The function will fail if: [EACCES] Search permission is denied for a component of the path prefix. [EACCES] Read permission is denied for the directory. [EFAULT] or points outside the process's allocated address space. Reliable detection of this error is implementation-depen- dent. [EINVAL] The path argument names a file that is not a symbolic link. [EIO] An I/O error occurred while reading from the file system. [ELOOP] Too many symbolic links were encountered in resolving path. [ENAMETOOLONG] The length of path exceeds or a pathname component is longer than In systems conforming to AES standards, this error will be returned when the path exceeds the bytes or a pathname component exceeds the bytes while is in effect. [ENAMETOOLONG] Pathname resolution of a symbolic link produced an intermediate result whose length exceeds [ENOENT] A component of path does not name an existing file or path is an empty string. [ENOTDIR] A component of the path prefix is not a directory. [ERANGE] The length of the name string read from the symbolic link exceeds AUTHOR
was developed by the University of California, Berkeley. SEE ALSO
stat(2), symlink(2), symlink(4), privileges(5), <unistd.h>. STANDARDS CONFORMANCE
readlink(2)

Check Out this Related Man Page

resolvepath(2)							   System Calls 						    resolvepath(2)

NAME
resolvepath - resolve all symbolic links of a path name SYNOPSIS
#include <unistd.h> int resolvepath(const char *path, char *buf, size_t bufsiz); DESCRIPTION
The resolvepath() function fully resolves all symbolic links in the path name path into a resulting path name free of symbolic links and places the resulting path name in the buffer buf which has size bufsiz. The resulting path name names the same file or directory as the original path name. All ``.'' components are eliminated and every non-leading ``..'' component is eliminated together with its preceding directory component. If leading ``..'' components reach to the root directory, they are replaced by ``/''. If the number of bytes in the resulting path name is less than bufsiz, the contents of the remainder of buf are unspecified. RETURN VALUES
Upon successful completion, resolvepath() returns the count of bytes placed in the buffer. Otherwise, it returns -1, leaves the buffer unchanged, and sets errno to indicate the error. ERRORS
The resolvepath() function will fail if: EACCES Search permission is denied for a component of the path prefix of path or for a path prefix component resulting from the resolution of a symbolic link. EFAULT The path or buf argument points to an illegal address. EIO An I/O error occurred while reading from the file system. ENOENT The path argument is an empty string or a component of path or a path name component produced by resolving a sym- bolic link does not name an existing file. ELOOP Too many symbolic links were encountered in resolving path. ENAMETOOLONG The length of path exceeds PATH_MAX, or a path name component is longer than NAME_MAX. Path name resolution of a symbolic link produced an intermediate result whose length exceeds PATH_MAX or a component whose length exceeds NAME_MAX. ENOTDIR A component of the path prefix of path or of a path prefix component resulting from the resolution of a symbolic link is not a directory. USAGE
No more than PATH_MAX bytes will be placed in the buffer. Applications should not assume that the returned contents of the buffer are null- terminated. SEE ALSO
readlink(2), realpath(3C) SunOS 5.10 12 May 1997 resolvepath(2)

Featured Tech Videos