System Administration Guide: Naming and Directory Services (FNS and NIS+)

Using the nisls Command With Directories

The nisls command lists the contents of an NIS+ directory. To use it, you must have read rights to the directory object.

To display in terse format, use:


nisls [-dgLmMR] directory-name

To display in verbose format, use:


nisls -l [-gm] [-dLMR] directory-name
Table 18–1 Options for the nisls Command

Option 

Purpose 

-d

Directory object. Instead of listing a directory's contents, treat it like another object. 

-L

Links. If the directory name is actually a link, the command follows the link and displays information about the linked directory. 

-M

Master. Get the information from the master server only. Although this provides the most up-to-date information, it may take longer if the master server is busy. 

-R

Recursive. List directories recursively. That is, if a directory contains other directories, their contents are displayed as well. 

-l

Long. Display information in long format. Long format displays an object's type, creation time, owner, and access rights. 

-g

Group. When displaying information in long format, display the directory's group owner instead of its owner. 

-m

Modification time. When displaying information in long format, display the directory's modification time instead of its creation time. 

Listing the Contents of a Directory—Terse

To list the contents of a directory in the default short format, use one or more of the options listed below and a directory name. If you don't supply a directory name, NIS+ will use the default directory.


nisls [-dLMR] directory-name

or


nisls [-dLMR]

For example, this instance of nisls is entered from the root master server of the root domain doc.com.:


rootmaster% nisls doc.com.:
org_dir
groups_dir

Here is another example entered from the root master server:


rootmaster% nisls -R sales.doc.com.
sales.doc.com.:
org_dir
groups_dir
groups_dir.sales.doc.com.: 
admin
org_dir.sales.doc.com.:
auto_master
auto_home
bootparams
cred
.

Listing the Contents of a Directory—Verbose

To list the contents of a directory in the verbose format, use the -l option and one or more of the options listed below. The -g and -m options modify the attributes that are displayed. If you don't supply a directory name, NIS+ will use the default directory.


nisls -l [-gm] [-dLMR] directory-name

or


nisls -l [-gm] [-dLMR]

Here is an example, entered from the master server of the root domain doc.com.:


rootmaster% nisls -l
doc.com.
D r---rmcdr---r--- rootmaster.doc.com. date org_dir
D r---rmcdr---r--- rootmaster.doc.com. date groups_dir