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