This section provides an overview of the NetInfo command-line utilities used in this chapter. The following sections, Section 3.7 and Section 3.8, demonstrate how to use nicl, nireport, nidump, and niload. For more details on these or other NetInfo utilities, see their respective manpages.
nidump |
nidump [-T timeout] (-r directory|format) [-t] domain
You can dump NetInfo information in a flat file format (such as the /etc/hosts format) or in a raw format that uses a C-like syntax:
{ "name" = ( "localhost" ); "ip_address" = ( "127.0.0.1" ); "serves" = ( "./local" ); }
nireport |
nireport [-T timeout] [-t] domain directory [property ...]
You can list all NetInfo groups by using the nireport utility. To use nireport, use the following syntax:
You can use nireport to list any portion of the NetInfo directory. For example, to list the top-level directory, specify the local domain, the / directory, and the name property, as in nireport . / name.
niload |
niload [-v] [-T timeout] [(-d|-m)] [(-p|-P password)] [-u user] {-r directory|format} [-t] domain
niload reads the Unix flat file format from standard input and loads it into the NetInfo database.
WARNING: If your shell history file is enabled, the -P option presents a security risk, since the password will be stored, along with the history of other shell commands. It is best to avoid using this option.
nicl |
nicl [options] datasource [command]
Use nicl to modify entries in the NetInfo database. You can manipulate directories and properties with nicl. The datasource may be the path to a NetInfo directory (such as / ) or the filesystem path of a NetInfo database (you must use the -raw option for this). Use -raw to work directly with the NetInfo database, such as /var/db/netinfo/local.nidb. This is useful in cases when the NetInfo daemon is down (such as when you boot into single-user mode).
Copyright © 2003 O'Reilly & Associates. All rights reserved.