Annotation of src/usr.bin/readlink/readlink.1, Revision 1.9
1.9 ! otto 1: .\" $OpenBSD: readlink.1,v 1.8 2003/06/03 02:56:15 millert Exp $
1.1 kstailey 2: .\"
3: .\" Copyright (c) 1990, 1993
4: .\" The Regents of the University of California. All rights reserved.
5: .\"
6: .\" This code is derived from software contributed to Berkeley by
7: .\" the Institute of Electrical and Electronics Engineers, Inc.
8: .\"
9: .\" Redistribution and use in source and binary forms, with or without
10: .\" modification, are permitted provided that the following conditions
11: .\" are met:
12: .\" 1. Redistributions of source code must retain the above copyright
13: .\" notice, this list of conditions and the following disclaimer.
14: .\" 2. Redistributions in binary form must reproduce the above copyright
15: .\" notice, this list of conditions and the following disclaimer in the
16: .\" documentation and/or other materials provided with the distribution.
1.8 millert 17: .\" 3. Neither the name of the University nor the names of its contributors
1.1 kstailey 18: .\" may be used to endorse or promote products derived from this software
19: .\" without specific prior written permission.
20: .\"
21: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31: .\" SUCH DAMAGE.
32: .\"
33: .Dd August 18, 1997
34: .Dt READLINK 1
35: .Os
36: .Sh NAME
37: .Nm readlink
38: .Nd display target of symbolic link on standard output
39: .Sh SYNOPSIS
40: .Nm readlink
1.3 niklas 41: .Op Fl fn
1.1 kstailey 42: .Ar file
43: .Sh DESCRIPTION
44: The
1.6 aaron 45: .Nm
1.1 kstailey 46: utility when invoked with the pathname of a symbolic link as its
47: argument dereferences the symbolic link and prints the name of target
1.6 aaron 48: on standard output.
1.9 ! otto 49: If the
! 50: .Fl f
! 51: option is not specified and
! 52: .Nm
! 53: is invoked with an argument other
1.6 aaron 54: than the pathname of a symbolic link, it exits with a nonzero exit
1.4 aaron 55: code without printing anything.
1.1 kstailey 56: .Pp
1.5 aaron 57: The options are as follows:
1.7 aaron 58: .Bl -tag -width Ds
1.3 niklas 59: .It Fl f
60: Canonicalize by following every symlink in every component of the given
61: path recursively.
1.9 ! otto 62: .Nm
! 63: will resolve both absolute and relative paths and
! 64: return the absolute pathname corresponding to
! 65: .Ar file .
! 66: The argument does not need to be a symbolic link.
1.1 kstailey 67: .It Fl n
68: Do not print a trailing newline character.
69: .El
70: .Pp
71: The
1.6 aaron 72: .Nm
1.4 aaron 73: utility exits 0 on success or >0 if an error occurred.
1.1 kstailey 74: .Sh SEE ALSO
1.9 ! otto 75: .Xr readlink 2 ,
! 76: .Xr realpath 2
1.1 kstailey 77: .Sh HISTORY
78: The
1.6 aaron 79: .Nm
1.2 kstailey 80: utility first appeared in
1.4 aaron 81: .Ox 2.1 .