[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 4

niscat Command

Purpose

Displays the contents of an NIS+ table.

Syntax

niscat [ -A ] [ -h ] [ -L ] [ -M ] [ -v ] tablename

niscat [ -A ] [ -L ] [ -M ] [ -P ] -o name

Description

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.

Flags

-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*.

Environment

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).

Exit Status

This command returns the following exit values:

0 Success
1 Failure

Examples

  1. To display the contents of the host's table, type:

    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.

  2. To display the passwd.org_dir on the standard output, type:

    niscat passwd.org_dir
  3. To display the contents of table frodo and the contents of all tables in its concatenation path, type:

    niscat -A frodo
  4. To display the entries in the table groups.org_dir as NIS+ objects, type:

    niscat -o '[ ]groups.org_dir'

    The brackets are protected from the shell by single quotation marks.

  5. To display the table object of the passwd.org_dir table, type:

    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.

  6. To display the directory object for org_dir, which includes information such as the access rights and replica information, type:

    niscat -o org_dir

Related Information

The nistbladm command, nisdefaults command, nismatch command.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]