xref: /freebsd/bin/realpath/realpath.1 (revision 90aea514c6249118e880d75972d063362f4bf492)
19ddb49cbSWarner Losh.\"-
21082b687SPoul-Henning Kamp.\" Copyright (c) 1990, 1993
31082b687SPoul-Henning Kamp.\"	The Regents of the University of California.  All rights reserved.
41082b687SPoul-Henning Kamp.\"
51082b687SPoul-Henning Kamp.\" This code is derived from software contributed to Berkeley by
61082b687SPoul-Henning Kamp.\" the Institute of Electrical and Electronics Engineers, Inc.
71082b687SPoul-Henning Kamp.\"
81082b687SPoul-Henning Kamp.\" Redistribution and use in source and binary forms, with or without
91082b687SPoul-Henning Kamp.\" modification, are permitted provided that the following conditions
101082b687SPoul-Henning Kamp.\" are met:
111082b687SPoul-Henning Kamp.\" 1. Redistributions of source code must retain the above copyright
121082b687SPoul-Henning Kamp.\"    notice, this list of conditions and the following disclaimer.
131082b687SPoul-Henning Kamp.\" 2. Redistributions in binary form must reproduce the above copyright
141082b687SPoul-Henning Kamp.\"    notice, this list of conditions and the following disclaimer in the
151082b687SPoul-Henning Kamp.\"    documentation and/or other materials provided with the distribution.
16fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors
171082b687SPoul-Henning Kamp.\"    may be used to endorse or promote products derived from this software
181082b687SPoul-Henning Kamp.\"    without specific prior written permission.
191082b687SPoul-Henning Kamp.\"
201082b687SPoul-Henning Kamp.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
211082b687SPoul-Henning Kamp.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
221082b687SPoul-Henning Kamp.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
231082b687SPoul-Henning Kamp.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
241082b687SPoul-Henning Kamp.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
251082b687SPoul-Henning Kamp.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
261082b687SPoul-Henning Kamp.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
271082b687SPoul-Henning Kamp.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
281082b687SPoul-Henning Kamp.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
291082b687SPoul-Henning Kamp.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
301082b687SPoul-Henning Kamp.\" SUCH DAMAGE.
311082b687SPoul-Henning Kamp.\" From: src/bin/pwd/pwd.1,v 1.11 2000/11/20 11:39:39 ru Exp
321082b687SPoul-Henning Kamp.\"
337a416f3eSRuslan Ermilov.Dd June 21, 2011
341082b687SPoul-Henning Kamp.Dt REALPATH 1
35caa2db3bSRuslan Ermilov.Os
361082b687SPoul-Henning Kamp.Sh NAME
371082b687SPoul-Henning Kamp.Nm realpath
381082b687SPoul-Henning Kamp.Nd return resolved physical path
391082b687SPoul-Henning Kamp.Sh SYNOPSIS
401082b687SPoul-Henning Kamp.Nm
4108995e29SRobert Watson.Op Fl q
427a416f3eSRuslan Ermilov.Op Ar path ...
431082b687SPoul-Henning Kamp.Sh DESCRIPTION
4487450669SPhilippe CharnierThe
45468e8177SRuslan Ermilov.Nm
4687450669SPhilippe Charnierutility uses the
471082b687SPoul-Henning Kamp.Xr realpath 3
481082b687SPoul-Henning Kampfunction to resolve all symbolic links, extra
49468e8177SRuslan Ermilov.Ql /
501082b687SPoul-Henning Kampcharacters and references to
511082b687SPoul-Henning Kamp.Pa /./
521082b687SPoul-Henning Kampand
531082b687SPoul-Henning Kamp.Pa /../
541082b687SPoul-Henning Kampin
551082b687SPoul-Henning Kamp.Ar path .
567a416f3eSRuslan ErmilovIf
577a416f3eSRuslan Ermilov.Ar path
587a416f3eSRuslan Ermilovis absent, the current working directory
597a416f3eSRuslan Ermilov.Pq Sq Pa .\&
607a416f3eSRuslan Ermilovis assumed.
6108995e29SRobert Watson.Pp
6208995e29SRobert WatsonIf
6308995e29SRobert Watson.Fl q
6408995e29SRobert Watsonis specified, warnings will not be printed when
6508995e29SRobert Watson.Xr realpath 3
6608995e29SRobert Watsonfails.
676fca4c7cSRuslan Ermilov.Sh EXIT STATUS
68d628d776SRuslan Ermilov.Ex -std
69*76ec6f51SFernando Apesteguía.Sh EXAMPLES
70*76ec6f51SFernando ApesteguíaShow the physical path of the
71*76ec6f51SFernando Apesteguía.Pa /dev/log
72*76ec6f51SFernando Apesteguíadirectory silencing warnings if any:
73*76ec6f51SFernando Apesteguía.Bd -literal -offset indent
74*76ec6f51SFernando Apesteguía$ realpath -q /dev/log
75*76ec6f51SFernando Apesteguía/var/run/log
76*76ec6f51SFernando Apesteguía.Ed
771082b687SPoul-Henning Kamp.Sh SEE ALSO
781082b687SPoul-Henning Kamp.Xr realpath 3
79468e8177SRuslan Ermilov.Sh HISTORY
80468e8177SRuslan ErmilovThe
81468e8177SRuslan Ermilov.Nm
82468e8177SRuslan Ermilovutility first appeared in
8318e73fc0SRuslan Ermilov.Fx 4.3 .
84