query man page on 4.4BSD

Man page or keyword search:  
man Server   1065 pages
apropos Keyword Search (all sections)
Output format
4.4BSD logo
[printable version]

QUERY(1)							      QUERY(1)

NAME
       query - query nameservers through resolver library calls

SYNOPSIS
       query [-n nameserver] [-t type] [-c class] [-r retry] [-p retry period]
       [-d] [-s] [-v] host

DESCRIPTION
       The query program is  a	general	 interface  to	nameservers  via  BIND
       resolver library calls.	The program supports queries to the nameserver
       with an opcode of QUERY.	 This program is intended to be a  replacement
       or supplement to programs like nstest, nsquery and nslookup.  All argu‐
       ments except for host and ns are treated without case-sensitivity.

OPTIONS
       -n	 The nameserver to be used  in	the  query.   Nameservers  can
		 appear	 as  either  Internet addresses of the form w.x.y.z or
		 can appear  as	 domain	 names.	  (default:  as	 specified  in
		 /etc/resolv.conf)

       -t	 The type of resource record of interest.  Types include:

		      A		address
		      NS	nameserver
		      CNAME	canonical name
		      PTR	domain name pointer
		      SOA	start of authority
		      WKS	well-known service
		      HINFO	host information
		      MINFO	mailbox information
		      MX	mail exchange
		      RP	responsible person
		      MG	mail group member
		      AFSDB
				DCE or AFS server
		      ANY	wildcard

		 Note that any case may be used.  (default:  ANY)

       -c	 The class of resource records of interest.  Classes include:

			   IN	     Internet
			   HS	     Hesiod
			   CHAOS     Chaos
			   ANY	     wildcard

		 Note that any case may be used.  (default:  IN)

       -r	 The  number  of  times	 to  retry  if	the  nameserver is not
		 responding.  (default:	 4)

       -p	 Period to wait before timing  out.   (default:	  RES_TIMEOUT)
		 options field.	 (default:  any answer)

       -d	 Turn  on  debugging.	This  sets  the	 RES_DEBUG  bit of the
		 resolver's options field.  (default:  no debugging)

       -s	 Use a stream rather than a packet.  This uses	a  TCP	stream
		 connection  with  the	nameserver rather than a UDP datagram.
		 This sets the RES_USEVC bit of the resolver's options	field.
		 (default:  UDP)

       -v	 Synonym for the 's' flag.

       host	 The name of the host (or domain) of interest.

FILES
       /etc/resolv.conf	   to get the default ns and search lists
       <arpa/nameser.h>	   list of usable RR types and classes
       <resolv.h>	   list of resolver flags

SEE ALSO
       nslookup(1), nstest(1), nsquery(1), named(8), resolver(5)

DIAGNOSTICS
       If  the	resolver  fails to answer the query and debugging has not been
       turned on, query will simply print a message like:

       Query failed (rc = 1) : Unknown host

       The value of the return code is supplied by h_errno.

BUGS
       Queries of a class other than IN can  have  interesting	results	 since
       ordinarily  a  nameserver only has a list of root nameservers for class
       IN resource records.

       Query uses a call to inet_addr() to determine if the argument  for  the
       '-n'  option  is	 a valid Internet address.  Unfortunately, inet_addr()
       seems to cause a segmentation fault with	 some  (bad)  addresses	 (e.g.
       1.2.3.4.5).

AUTHOR
       Bryan Beecher

4.3 Berkeley Distribution	 10 March 1990			      QUERY(1)
[top]

List of man pages available for 4.4BSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
...................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net