summaryrefslogtreecommitdiffstats
path: root/man2/link.2
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--man2/link.232
1 files changed, 16 insertions, 16 deletions
diff --git a/man2/link.2 b/man2/link.2
index 1533409..74437a0 100644
--- a/man2/link.2
+++ b/man2/link.2
@@ -9,7 +9,7 @@
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\" Modified 2005-04-04, as per suggestion by Michael Hardt for rename.2
.\"
-.TH link 2 2023-03-30 "Linux man-pages 6.05.01"
+.TH link 2 2023-10-31 "Linux man-pages 6.7"
.SH NAME
link, linkat \- make a new name for a file
.SH LIBRARY
@@ -18,21 +18,21 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <unistd.h>
-.PP
+.P
.BI "int link(const char *" oldpath ", const char *" newpath );
-.PP
+.P
.BR "#include <fcntl.h> " "/* Definition of " AT_* " constants */"
.B #include <unistd.h>
-.PP
+.P
.BI "int linkat(int " olddirfd ", const char *" oldpath ,
.BI " int " newdirfd ", const char *" newpath ", int " flags );
.fi
-.PP
+.P
.RS -4
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.RE
-.PP
+.P
.BR linkat ():
.nf
Since glibc 2.10:
@@ -43,13 +43,13 @@ Feature Test Macro Requirements for glibc (see
.SH DESCRIPTION
.BR link ()
creates a new link (also known as a hard link) to an existing file.
-.PP
+.P
If
.I newpath
exists, it will
.I not
be overwritten.
-.PP
+.P
This new name may be used exactly as the old one for any operation;
both names refer to the same file (and so have the same permissions
and ownership) and it is impossible to tell which name was the
@@ -60,7 +60,7 @@ The
system call operates in exactly the same way as
.BR link (),
except for the differences described here.
-.PP
+.P
If the pathname given in
.I oldpath
is relative, then it is interpreted relative to the directory
@@ -70,7 +70,7 @@ referred to by the file descriptor
the calling process, as is done by
.BR link ()
for a relative pathname).
-.PP
+.P
If
.I oldpath
is relative and
@@ -82,13 +82,13 @@ then
is interpreted relative to the current working
directory of the calling process (like
.BR link ()).
-.PP
+.P
If
.I oldpath
is absolute, then
.I olddirfd
is ignored.
-.PP
+.P
The interpretation of
.I newpath
is as for
@@ -96,7 +96,7 @@ is as for
except that a relative pathname is interpreted relative
to the directory referred to by the file descriptor
.IR newdirfd .
-.PP
+.P
The following values can be bitwise ORed in
.IR flags :
.TP
@@ -152,11 +152,11 @@ linkat(AT_FDCWD, "/proc/self/fd/<fd>", newdirfd,
newname, AT_SYMLINK_FOLLOW);
.EE
.in
-.PP
+.P
Before Linux 2.6.18, the
.I flags
argument was unused, and had to be specified as 0.
-.PP
+.P
See
.BR openat (2)
for an explanation of the need for
@@ -260,7 +260,7 @@ are not on the same mounted filesystem.
.BR link ()
does not work across different mounts,
even if the same filesystem is mounted on both.)
-.PP
+.P
The following additional errors can occur for
.BR linkat ():
.TP