ypcat Command
Purpose
Prints out a Network Information Services (NIS) map.
Syntax
To Display the Network Information Services Database
/usr/bin/ypcat [ -k ] [ -t ] [ -d DomainName ] MapName
To Display the Nickname Translation Table
/usr/bin/ypcat -x
Description
The ypcat command prints out the Network Information Services (NIS) map you specify with the MapName parameter. You can specify either a map name or a map nickname. Because the ypcat command uses the NIS service, you do not need to specify a server.
Flags
Item | Description |
---|---|
-k | Displays the keys for those maps in which the values are null or for which the key is not part of the value. (None of the maps derived from files that have an ASCII version in the /etc directory fall into this class.) |
-t | Indicates that the name specified by the MapName parameter is not a nickname. This flag causes the ypcat command to bypass the nickname translation table and search only for the map specified by the MapName parameter. |
-d DomainName | Searches the specified domain for the specified map. |
-x | Displays the nickname translation table. This table lists the map nicknames the command knows of and indicates the map name (as specified by the MapName parameter) associated with each nickname. |
Examples
- To look at the networkwide
password map, passwd.byname, type:
In this example, passwd is the nickname for the passwd.byname map.ypcat passwd
- To locate a map, type:
In this example, the ypcat command bypasses any maps with the nickname of passwd and searches for a map with the full name of passwd.ypcat -t passwd
- To display a map in
another domain, type:
In this example, the ypcat command locates the map named passwd in the domain named polaris.ypcat -d polaris passwd
- To display the map nickname
translation table, type:
In this example, the ypcat command displays a list of map nicknames and their associated map names.ypcat -x