TITLE
    Mac OS X Server: What is nifind?
Article ID:
Created:
Modified:
60174
3/23/99
10/31/00

TOPIC

    The nifind command is a utility for reading information from the NetInfo database to command line output.


DISCUSSION

    Using the NetInfo command line utilities requires knowledge of NetInfo and domains. Please see the following articles for more information

    Article 60038: " What is NetInfo? "
    Article 30832: " A Basic Introduction to NetInfo Domains. "

    Nifind is a simple but powerful utility for finding and displaying information in NetInfo databases. It is useful for verifying in the existence of directories and for displaying their properties and values at the command line.

    There are several options for using nifind

    -a searches for the directory in the entire NetInfo hierarchy
    -n causes the local domain not to be searched, useful if the local domain is not in question
    -p prints the properties and values for a subdirectory
    -t specify a timeout value in seconds. This may be needed in large NetInfo networks
    -v verbose output mode, causes more information to be displayed

    Examples

    In these examples the network is a three level hierarchy. The top level is "/" the midlevel is "/scotland" and the local level is "/scotland/skye".

    #nifind /machines

    /machines found in /scotland/skye, id =1
    /machines found in /scotland, id = 49
    /machines found in /, id =190

    This tells you that a /machines directory was found in all three domains, the local (skye), the mid-level (/scotland) and the root. It also displays the directory id number for each of these directories.

    An example using the -p flag:

    #nifind -p /machines/skye

    /machines/skye found in /scotland, id = 321
    name: skye
    servers: skye/local
    bootparams: root=aberdeen:/enterprise/release/private
    bootfile: mach.rhap
    ip_address: 192.168.156.1
    en_address: 0:b:0:54:3b:5
    owner: MacLeod

    By specifying a subdirectory, you can display information on the properties in that directory and their values. This can be done for any of the directories in NetInfo. By default these are: aliases, fax_modems, groups, locations, machines, mounts, old_mounts, printers, services, and users. The subdirectories inside these default directories will vary with your setup.

Document Information
Product Area: Mac OS System Software
Category: Mac OS X Server
Sub Category: General Topics

Copyright © 2000 Apple Computer, Inc. All rights reserved.