'\"macro stdmacro
.if n .pH g1.ypwhich @(#)ypwhich	40.2 of 12/29/89
.\" Copyright 1989 AT&T
.\" @(#)ypwhich.1 1.8 89/09/28 SMI;
.\" Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved.
.nr X
.if \nX=0 .ds x} ypwhich 1 "" "\&"
.if \nX=1 .ds x} ypwhich 1 ""
.if \nX=2 .ds x} ypwhich 1 "" "\&"
.if \nX=3 .ds x} ypwhich "" "" "\&"
.TH \*(x}
.SH NAME
ypwhich \- return name of YP server or map master
.SH SYNOPSIS
\f4ypwhich\fR
[
\f4\-d\fR
[
\f2ypdomain\fR
] ]
[
\f2hostname\fR
]
.br
\f4ypwhich\fR
[
\f4\-d\fR
\f2ypdomain\fR
]
\f4\-m\fR
[
\f2mname\fR
]
.SH DESCRIPTION
.P
\f4ypwhich\fR
tells which
\s-1YP\s0
server supplies the 
\s-1YP\s0
name services to a
\s-1YP\s0
client, or which is the master for a map.
If invoked without arguments, it gives the
\s-1YP\s0
server for the local machine. 
If
\f2hostname\fR
is specified, that machine is queried
to find out which
\s-1YP\s0
master it is using.
.P
Refer to
\f4ypfiles\fR(4)
and
\f4ypserv\fR(1M)
for an overview of the 
\s-1YP\s0
name services.
.P
The following options are available:
.TP
\f4\-d \fR[\f2ypdomain\fR]
Use
\f2ypdomain\fR
instead of the default domain.
.TP
\f4\-m \f2mname\fR
Find the master
\s-1YP\s0
server for a map. 
No
\f2hostname\fR
can be specified with
\f4\-m\fR.
\f2mname\fR
can be a mapname, or a nickname for a map.
When
\f2mname\fR
is omitted, produce a list available maps.
.SH SEE ALSO
\f4ypserv\fR(1M),
\f4ypset\fR(1M),
\f4ypfiles\fR(4)
