diff options
| author | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 19:55:15 -0400 |
|---|---|---|
| committer | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 19:55:15 -0400 |
| commit | 253e67c8b3a72b3a4757fdbc5845297628db0a4a (patch) | |
| tree | adf53b66087aa30dfbf8bf391a1dadb044c3bf4d /static/netbsd/man1/readlink.1 | |
| parent | a9157ce950dfe2fc30795d43b9d79b9d1bffc48b (diff) | |
docs: Added All NetBSD Manuals
Diffstat (limited to 'static/netbsd/man1/readlink.1')
| -rw-r--r-- | static/netbsd/man1/readlink.1 | 147 |
1 files changed, 147 insertions, 0 deletions
diff --git a/static/netbsd/man1/readlink.1 b/static/netbsd/man1/readlink.1 new file mode 100644 index 00000000..f2c72aa9 --- /dev/null +++ b/static/netbsd/man1/readlink.1 @@ -0,0 +1,147 @@ +.\" $NetBSD: readlink.1,v 1.7 2025/05/03 21:34:08 kre Exp $ +.\" +.\" Copyright (c) 2002-2011 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Andrew Brown and Jan Schaumann. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd May 3, 2025 +.Dt READLINK 1 +.Os +.Sh NAME +.Nm readlink +.Nd display target of a symbolic link +.Sh SYNOPSIS +.Nm +.Op Fl fnqsv +.Ar +.Sh DESCRIPTION +The +.Nm +utility displays the target of a symbolic link. +If a given argument +.Ar file +is not a symbolic link and the +.Fl f +option is not specified, +.Nm readlink +will print nothing to standard output about that +.Ar file +and eventually exit with an error status. +If the +.Fl f +option is specified, the output is canonicalized by following every symlink +in every component of the given path recursively. +.Nm +will resolve both absolute and relative paths, and, if possible, +return the absolute pathname corresponding to +.Ar file . +In this case, the argument does not need to be a symbolic link. +.Pp +The options are as follows: +.Bl -tag -width Fl +.It Fl f +Canonicalize the pathname of +.Ar file , +as described above. +.It Fl n +Do not force a newline to appear after the output for each +.Ar file . +.It Fl q +Suppress failure messages if calls to +.Xr lstat 2 +fail. +This is the default for +.Nm readlink . +.It Fl s +This is an alternative to +.Fl q . +.It Fl v +Turn off quiet mode. +.Nm +will display errors about +.Ar file\^ Ns s +for which +.Xr lstat 2 +fails, or without +.Fl f , +which are not symbolic links. +This is the inverse of +.Fl q +and +.Fl s . +.El +.Sh ENVIRONMENT +.Bl -tag +.It Ev POSIXLY_CORRECT +To obtain standards compliance, if +.Ev POSIXLY_CORRECT +is set in the environment, then +.Fl v +is the default, rather than +.Fl q . +.El +.Sh EXIT STATUS +.Nm +will exit with status 1 on a usage error, +or if any of the given +.Ar file +arguments do not exist, or if +.Fl f +is absent and any +.Ar file +arguments do not name symbolic links. +Otherwise +.Nm +exits with status 0. +.Sh SEE ALSO +.Xr realpath 1 , +.Xr stat 1 , +.Xr lstat 2 , +.Xr readlink 2 +.Sh STANDARDS +.Nm +is expected to conform to +.St -p1003.1-2024 , +provided it is run with +.Ev POSIXLY_CORRECT +set in its environment. +.Sh HISTORY +The +.Nm +utility appeared along with +.Nm stat , +within which it is integrated, in +.Nx 1.6 . +.Sh AUTHORS +.An -nosplit +The +.Nm stat +utility was written by +.An Andrew Brown +.Aq atatat@NetBSD.org . +The original combined man page was written by +.An Jan Schaumann +.Aq jschauma@NetBSD.org . |
