mirror of https://github.com/mkerrisk/man-pages
symlink.2: Give arguments of symlink() more meaningful names
Reported-by: Fabrice Bauzac <libnoon@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
a605264d16
commit
f2ae6dde0c
|
@ -29,13 +29,13 @@
|
|||
.\" Modified 1997-01-31 by Eric S. Raymond <esr@thyrsus.com>
|
||||
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
|
||||
.\"
|
||||
.TH SYMLINK 2 2013-01-27 "Linux" "Linux Programmer's Manual"
|
||||
.TH SYMLINK 2 2013-10-26 "Linux" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
symlink \- make a new name for a file
|
||||
.SH SYNOPSIS
|
||||
.B #include <unistd.h>
|
||||
.sp
|
||||
.BI "int symlink(const char *" oldpath ", const char *" newpath );
|
||||
.BI "int symlink(const char *" filepath ", const char *" linkpath );
|
||||
.sp
|
||||
.in -4n
|
||||
Feature Test Macro Requirements for glibc (see
|
||||
|
@ -52,9 +52,9 @@ _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\ >=\ 200112L
|
|||
.SH DESCRIPTION
|
||||
.BR symlink ()
|
||||
creates a symbolic link named
|
||||
.I newpath
|
||||
.I linkpath
|
||||
which contains the string
|
||||
.IR oldpath .
|
||||
.IR filepath .
|
||||
|
||||
Symbolic links are interpreted at run time as if the contents of the
|
||||
link had been substituted into the path being followed to find a file or
|
||||
|
@ -77,7 +77,7 @@ the sticky bit
|
|||
set.
|
||||
|
||||
If
|
||||
.I newpath
|
||||
.I linkpath
|
||||
exists it will
|
||||
.I not
|
||||
be overwritten.
|
||||
|
@ -90,9 +90,9 @@ is set appropriately.
|
|||
.TP
|
||||
.B EACCES
|
||||
Write access to the directory containing
|
||||
.I newpath
|
||||
.I linkpath
|
||||
is denied, or one of the directories in the path prefix of
|
||||
.I newpath
|
||||
.I linkpath
|
||||
did not allow search permission.
|
||||
(See also
|
||||
.BR path_resolution (7).)
|
||||
|
@ -103,27 +103,27 @@ The resources could be inodes or disk blocks, depending on the filesystem
|
|||
implementation.
|
||||
.TP
|
||||
.B EEXIST
|
||||
.I newpath
|
||||
.I linkpath
|
||||
already exists.
|
||||
.TP
|
||||
.B EFAULT
|
||||
.IR oldpath " or " newpath " points outside your accessible address space."
|
||||
.IR filepath " or " linkpath " points outside your accessible address space."
|
||||
.TP
|
||||
.B EIO
|
||||
An I/O error occurred.
|
||||
.TP
|
||||
.B ELOOP
|
||||
Too many symbolic links were encountered in resolving
|
||||
.IR newpath .
|
||||
.IR linkpath .
|
||||
.TP
|
||||
.B ENAMETOOLONG
|
||||
.IR oldpath " or " newpath " was too long."
|
||||
.IR filepath " or " linkpath " was too long."
|
||||
.TP
|
||||
.B ENOENT
|
||||
A directory component in
|
||||
.I newpath
|
||||
.I linkpath
|
||||
does not exist or is a dangling symbolic link, or
|
||||
.I oldpath
|
||||
.I filepath
|
||||
is the empty string.
|
||||
.TP
|
||||
.B ENOMEM
|
||||
|
@ -135,16 +135,16 @@ entry.
|
|||
.TP
|
||||
.B ENOTDIR
|
||||
A component used as a directory in
|
||||
.I newpath
|
||||
.I linkpath
|
||||
is not, in fact, a directory.
|
||||
.TP
|
||||
.B EPERM
|
||||
The filesystem containing
|
||||
.I newpath
|
||||
.I linkpath
|
||||
does not support the creation of symbolic links.
|
||||
.TP
|
||||
.B EROFS
|
||||
.I newpath
|
||||
.I linkpath
|
||||
is on a read-only filesystem.
|
||||
.SH CONFORMING TO
|
||||
SVr4, 4.3BSD, POSIX.1-2001.
|
||||
|
@ -154,7 +154,7 @@ SVr4, 4.3BSD, POSIX.1-2001.
|
|||
.\" re multiple files with the same name, and NFS.
|
||||
.SH NOTES
|
||||
No checking of
|
||||
.I oldpath
|
||||
.I filepath
|
||||
is done.
|
||||
|
||||
Deleting the name referred to by a symlink will actually delete the
|
||||
|
|
Loading…
Reference in New Issue