Once the namespace has been set up, you can browse using the following commands:
fnlist to list context contents (see Listing Context Contents)
fnlookup to display the bindings of a composite name (see Displaying the Bindings of a Composite Name).
fnattr to show the attributes of a composite name (see Showing the Attributes of a Composite Name).
The fnlist command displays the names and references bound in the context of name.
fnlist [-lvA] [name] |
Option |
Description |
---|---|
name |
A composite name. Displays the names bound in the context of name |
-v |
Verbose. Displays the binding in more detail |
-l |
Also displays the bindings of the names bound in the named context |
-A |
Forces fnlist to obtain its information from the authoritative server. Under NIS and NIS+, that is the domain master server. The -A option has no effect when the primary naming service is files. |
For example:
To list names in the initial context:
% fnlist |
To list in detail all the users in the current organizational unit:
% fnlist -v user |
To list the contents of the service context for the user pug:
% fnlist user/pug/service |
To list names and bindings from the authoritative server:
% fnlist -l -A |
The fnlookup command shows the binding of the given composite name.
fnlookup [-vAL] [name] |
Option |
Description |
---|---|
name |
The name of a context. Displays the binding and XFN link of name |
-v |
Verbose. Displays the binding in more detail |
-L |
Also displays the XFN link that the name is bound to |
-A |
Forces fnlist to obtain its information from the authoritative server. Under NIS and NIS+, that is the domain master server. The -A option has no effect when the primary naming service is files-based. |
For example: to display the binding of user/ana/service/printer:
# fnlookup user/ana/service/printer |
The fnattr command displays (and updates) the attributes of the given composite name.
For example, to search for the attributes associated with a user named ada:
# fnattr user/ada |
To search for the attributes associated with a printer named laser-9:
# fnattr thisorgunit/service/printer/laser-9 |
See Working With Attributes for more details.
The fnsearch command displays the names and, optionally, the attributes and references of objects bound at or below a composite name whose attributes satisfy the given search criteria.
For example:
To list the users and their attributes who have an attribute called realname:
% fnsearch user realname |
To list the users with the attribute realname whose value is Ravi Chattha:
% fnsearch user “realname == 'Ravi Chattha'” |
The fnsearch command uses the common Boolean operators. Note the use of double and single quotes and double equals sign in the above example.