The Linux Command 'ypcat'

Print the keys of a specific NIS database

The Linux command ypcat prints the values of all keys from the NIS database specified by mapname, which may be a map name or a map nickname.  

ypcat info

Command Syntax

The command takes the following two general forms:

ypcat [ -kt ] [ -d domain ] [ -h hostname ] mapname
ypcat -x

The ypcat command isn't installed by default on some distributions. If it's not available, install it through your distribution's package manager.

Options for Using ypcat

The command's execution modifies with the use of different switches:

  • -d domain: Specify a domain other than the default domain as returned by domainname.
  • -h hostname: Specify a hostname other than the default one as found by ypbind.
  • -k: Display map keys. This option is useful with maps in which the values are null or the key is not part of the value.
  • -t: This option inhibits map nickname translation.
  • -x: Display the map nickname translation table.