Displays the contents of an NIS+ table.
In the first syntax, the niscat command displays the contents of the NIS+ tables named by tablename. In the second syntax, it displays the internal representation of the NIS+ objects named by name.
Item | Description |
---|---|
-A | Displays the data within the table and all of the data in tables in the initial table's concatenation path. |
-h | Displays the header line prior to displaying the table. The header consists of the # character followed by the name of each column. The column names are separated by the table separator character. |
-L | Follows links. When this flag is specified if tablename or name names a LINK type object, the link is followed and the object or table named by the link is displayed. |
-M | Specifies that the request should be sent to the master server of the named data. This guarantees that the most up-to-date information is seen at the possible expense of increasing the load on the master server and increasing the possibility of the NIS+ server being unavailable or busy for updates. |
-o | Displays the internal representation of the named NIS+ objects. If name is an indexed name, then each of the matching entry objects is displayed. This flag is used to display access rights and other attributes of individual columns. |
-P | Follows concatenation path. This flag specifies that the request should follow the concatenation path of a table if the initial search is unsuccessful. This flag is only useful when using an indexed name for name and the -o flag. |
-v | Displays binary data directly. This flag displays columns containing binary data on the standard output. Without this flag, binary data is displayed as the string *BINARY*. |
Item | Description |
---|---|
NIS_PATH | If this variable is set and the NIS+ name is not fully qualified, each directory specified will be searched until the object is found (see the nisdefaults command). |
This command returns the following exit values:
Item | Description |
---|---|
0 | Success |
1 | Failure |
niscat -h hosts.org_dir
# cname name addr comment
client1 client1 129.144.201.100 Joe Smith
crunchy crunchy 129.144.201.44 Jane Smith
crunchy softy 129.144.201.44
The string *NP* is returned in those fields where the user has insufficient access rights.
niscat passwd.org_dir
niscat -A frodo
niscat -o '[ ]groups.org_dir'
The brackets are protected from the shell by single quotation marks.
niscat -o passwd.org_dir
The previous example displays the passwd table object and not the passwd table. The table object includes information such as the number of columns, column type, searchable or not searchable separator, access rights, and other defaults.
niscat -o org_dir