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