]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man2/symlink.2
socket.2: tfix
[thirdparty/man-pages.git] / man2 / symlink.2
index 7ed1029d3dbf4e6fd2f09bedc809b18db1d1195b..d2842203f71597ebe6d0a61e5266df653a338c0c 100644 (file)
 .\" 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 2016-10-08 "Linux" "Linux Programmer's Manual"
+.TH SYMLINK 2 2017-09-15 "Linux" "Linux Programmer's Manual"
 .SH NAME
 symlink, symlinkat \- make a new name for a file
 .SH SYNOPSIS
 .nf
 .B #include <unistd.h>
-.sp
+.PP
 .BI "int symlink(const char *" target ", const char *" linkpath );
-.sp
+
 .BR "#include <fcntl.h>           " "/* Definition of AT_* constants */"
 .B #include <unistd.h>
-.sp
+.PP
 .BI "int symlinkat(const char *" target ", int " newdirfd \
 ", const char *" linkpath );
-.sp
+.PP
 .fi
 .in -4n
 Feature Test Macro Requirements for glibc (see
 .BR feature_test_macros (7)):
 .in
-.sp
+.PP
 .ad l
 .BR symlink ():
 .RS 4
@@ -58,7 +58,7 @@ _XOPEN_SOURCE\ >=\ 500 || _POSIX_C_SOURCE\ >=\ 200112L
 .\"    || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
     || /* Glibc versions <= 2.19: */ _BSD_SOURCE
 .RE
-.sp
+.PP
 .BR symlinkat ():
 .PD 0
 .ad l
@@ -78,27 +78,27 @@ creates a symbolic link named
 .I linkpath
 which contains the string
 .IR target .
-
+.PP
 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
 directory.
-
+.PP
 Symbolic links may contain
 .I ..
 path components, which (if used at the start of the link) refer to the
 parent directories of that in which the link resides.
-
+.PP
 A symbolic link (also known as a soft link) may point to an existing
 file or to a nonexistent one; the latter case is known as a dangling
 link.
-
+.PP
 The permissions of a symbolic link are irrelevant; the ownership is
 ignored when following the link, but is checked when removal or
 renaming of the link is requested and the link is in a directory with
 the sticky bit
 .RB ( S_ISVTX )
 set.
-
+.PP
 If
 .I linkpath
 exists, it will
@@ -110,7 +110,7 @@ The
 system call operates in exactly the same way as
 .BR symlink (),
 except for the differences described here.
-
+.PP
 If the pathname given in
 .I linkpath
 is relative, then it is interpreted relative to the directory
@@ -120,7 +120,7 @@ referred to by the file descriptor
 the calling process, as is done by
 .BR symlink ()
 for a relative pathname).
-
+.PP
 If
 .I linkpath
 is relative and
@@ -132,7 +132,7 @@ then
 is interpreted relative to the current working
 directory of the calling process (like
 .BR symlink ()).
-
+.PP
 If
 .I linkpath
 is absolute, then
@@ -235,14 +235,14 @@ SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.
 .\" See
 .\" .BR open (2)
 .\" re multiple files with the same name, and NFS.
-
+.PP
 .BR symlinkat ():
 POSIX.1-2008.
 .SH NOTES
 No checking of
 .I target
 is done.
-
+.PP
 Deleting the name referred to by a symbolic link will actually delete the
 file (unless it also has other hard links).
 If this behavior is not desired, use
@@ -262,6 +262,7 @@ that corresponds to the
 argument.
 .SH SEE ALSO
 .BR ln (1),
+.BR namei (1),
 .BR lchown (2),
 .BR link (2),
 .BR lstat (2),