1.\" $OpenBSD: ypwhich.1,v 1.16 2008/05/24 13:59:09 sobrado 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.\" $Id: ypwhich.1,v 1.16 2008/05/24 13:59:09 sobrado Exp $ 33.\" 34.Dd $Mdocdate: May 24 2008 $ 35.Dt YPWHICH 1 36.Os 37.Sh NAME 38.Nm ypwhich 39.Nd return hostname of YP server or map master 40.Sh SYNOPSIS 41.Nm ypwhich 42.Op Fl t 43.Op Fl d Ar domain 44.Oo 45.Op Fl h 46.Ar host 47.Oc 48.Nm ypwhich 49.Op Fl t 50.Op Fl d Ar domain 51.Op Fl h Ar host 52.Fl m Op Ar mname 53.Nm ypwhich 54.Fl x 55.Sh DESCRIPTION 56.Nm 57tells which 58.Tn YP 59server supplies 60.Tn YP 61services to a client, or which is the master for a map. 62If invoked without arguments, it gives the 63.Tn YP 64server for the local machine. 65If 66.Ar host 67is specified, that machine is queried to find out 68which 69.Tn YP 70server it is using. 71.Pp 72The options are as follows: 73.Bl -tag -width Ds 74.It Fl d Ar domain 75Specify a domain other than the default domain. 76.It Fl h Ar host 77Specify which host to query. 78.It Fl m Op Ar mname 79Find the master 80.Tn YP 81server for the named map. 82The 83.Ar host 84to query, if non-default, 85must be specified using the 86.Fl h 87option. 88.Ar mname 89can be a map name or nickname. 90If 91.Ar mname 92is omitted, 93.Nm 94will produce a list of available maps. 95.It Fl t 96Inhibit translation of map nicknames 97to their corresponding map names. 98.It Fl x 99Display the map nickname table. 100.El 101.Sh SEE ALSO 102.Xr domainname 1 , 103.Xr ypcat 1 , 104.Xr ypmatch 1 , 105.Xr yp 8 , 106.Xr ypbind 8 , 107.Xr yppoll 8 , 108.Xr ypset 8 109.Sh AUTHORS 110Theo de Raadt 111