niscat
rose1 发表于 2020-10-14 09:05浏览次数:
在Solaris上,niscat命令显示NIS +(网络信息服务)表和对象。
On Solaris, the niscat command displays NIS+ (Network Information Service) tables and objects.
目录:
1 niscat 运行系统环境
2 niscat 说明
3 niscat 语法
4 niscat 例子
niscat 运行系统环境
niscat 说明
在上面的第一种语法形式中,niscat显示由tablename命名的NIS +表的内容。
在第二种语法形式中,niscat显示由name命名的NIS +对象的内部表示。
In the first syntax form above, niscat displays the contents of the NIS+ tables named by tablename.
In the second syntax form, niscat displays the internal representation of the NIS+ objects named by name.
niscat 语法
niscat [-AhLMv] [-s sep] tablename...
niscat [-ALMP] -o name...
选件
-A
|
在初始表的串联 路径中显示表中的数据以及表中的所有数据。
|
-h
|
在显示表格之前显示标题行。标头由' # '(哈希)字符组成,后跟各列的名称。列名由表分隔符分隔。
|
-L
|
跟随链接。指定此选项后,如果表名或名称为LINK类型的对象,则将跟随该链接并显示由该链接命名的对象或表。
|
-M
|
仅主服务器。此选项指定应将请求发送到命名数据的主服务器。这样可以保证可以以增加主服务器上的负载和增加NIS +服务器不可用或忙于更新的可能性为代价来查看最新信息。
|
-P
|
遵循串联路径。此选项指定如果初始搜索失败,则请求应遵循表的串联路径。仅当将索引名称用作名称和-o选项时,此选项才有用。
|
-v
|
直接显示二进制数据。此选项在标准输出上显示包含二进制数据的列。如果没有此选项,二进制数据将显示为字符串“ * BINARY * ”。
|
-o 名称
|
显示命名的NIS +对象的内部表示。如果name是索引名称(请参见nismatch),那么将显示每个匹配的条目对象。此选项用于显示单个列的访问权限和其他属性。
|
-s sep
|
此选项指定用于分隔表列的字符。如果未指定任何字符,则使用表的默认分隔符。
|
环境
如果设置了NIS_PATH 环境变量,并且NIS +表名不是完全限定的,则将搜索指定的每个目录,直到找到该表为止。
niscat [-AhLMv] [-s sep] tablename...
niscat [-ALMP] -o name...
Options
-A
|
Display the data within the table and all of the data in tables in the initial table's concatenation path.
|
-h
|
Display the header line prior to displaying the table. The header consists of the '#' (hash) character followed by the name of each column. The column names are separated by the table separator character.
|
-L
|
Follow links. When this option 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
|
Master server only. This option 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.
|
-P
|
Follow concatenation path. This option specifies that the request should follow the concatenation path of a table if the initial search is unsuccessful. This option is only useful when using an indexed name for name and the -o option.
|
-v
|
Display binary data directly. This option displays columns containing binary data on the standard output. Without this option binary data is displayed as the string "*BINARY*".
|
-o name
|
Display the internal representation of the named NIS+ object(s). If name is an indexed name (see nismatch), then each of the matching entry objects is displayed. This option is used to display access rights and other attributes of individual columns.
|
-s sep
|
This option specifies the character to use to separate the table columns. If no character is specified, the default separator for the table is used.
|
Environment
If the NIS_PATH environment variable is set, and the NIS+ table name is not fully qualified, each directory specified will be searched until the table is found.
niscat 例子
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
如果用户没有足够的权限查看任何给定字段或条目的内容,则将打印字符串“ * NP * ”。
niscat -h hosts.org_dir
Display the contents of the host table. Output will resemble the following:
# 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
If the user has insufficient permissions to view the contents of any given field or entry, the string "*NP*" will be printed.