1.\" $OpenBSD: ypwhich.1,v 1.18 2019/01/17 06:18:27 tedu Exp $ 2.\" $NetBSD: ypwhich.1,v 1.3 1996/05/13 02:43:46 thorpej Exp $ 3.\" 4.\" Copyright (c) 1994 Christopher G. Demetriou 5.\" All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 1. Redistributions of source code must retain the above copyright 11.\" notice, this list of conditions and the following disclaimer. 12.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" notice, this list of conditions and the following disclaimer in the 14.\" documentation and/or other materials provided with the distribution. 15.\" 3. All advertising materials mentioning features or use of this software 16.\" must display the following acknowledgement: 17.\" This product includes software developed by Christopher G. Demetriou. 18.\" 3. The name of the author may not be used to endorse or promote products 19.\" derived from this software without specific prior written permission 20.\" 21.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31.\" 32.Dd $Mdocdate: January 17 2019 $ 33.Dt YPWHICH 1 34.Os 35.Sh NAME 36.Nm ypwhich 37.Nd return hostname of YP server or map master 38.Sh SYNOPSIS 39.Nm ypwhich 40.Op Fl t 41.Op Fl d Ar domain 42.Oo 43.Op Fl h 44.Ar host 45.Oc 46.Nm ypwhich 47.Op Fl t 48.Op Fl d Ar domain 49.Op Fl h Ar host 50.Fl m Op Ar mname 51.Nm ypwhich 52.Fl x 53.Sh DESCRIPTION 54.Nm 55tells which 56.Tn YP 57server supplies 58.Tn YP 59services to a client, or which is the master for a map. 60If invoked without arguments, it gives the 61.Tn YP 62server for the local machine. 63If 64.Ar host 65is specified, that machine is queried to find out 66which 67.Tn YP 68server it is using. 69.Pp 70The options are as follows: 71.Bl -tag -width Ds 72.It Fl d Ar domain 73Specify a domain other than the default domain. 74.It Fl h Ar host 75Specify which host to query. 76.It Fl m Op Ar mname 77Find the master 78.Tn YP 79server for the named map. 80The 81.Ar host 82to query, if non-default, 83must be specified using the 84.Fl h 85option. 86.Ar mname 87can be a map name or nickname. 88If 89.Ar mname 90is omitted, 91.Nm 92will produce a list of available maps. 93.It Fl t 94Inhibit translation of map nicknames 95to their corresponding map names. 96.It Fl x 97Display the map nickname table. 98.El 99.Sh SEE ALSO 100.Xr domainname 1 , 101.Xr ypcat 1 , 102.Xr ypmatch 1 , 103.Xr yp 8 , 104.Xr ypbind 8 , 105.Xr yppoll 8 , 106.Xr ypset 8 107.Sh AUTHORS 108.An Theo de Raadt 109