Generates the host table file.
/usr/sbin/mkhosts [ -v ] HostFile
The mkhosts command can be used to generate a hashed host database, using the filename specified by the HostFile parameter. It is not used if name resolution is performed by the named daemon. The host file is usually the /etc/hosts file, and in any case must be in the same format as the /etc/hosts file.
The mkhosts command generates database files named hostfile.pag and hostfile.dir. Updates to these files are built in a set of temporary files named hostfile.new.pag and hostfile.new.dir. The temporary files are copied into the database files only if the hostfile.new.pag and hostfile.new.dir files are built without errors.
The host file is used by one version of the gethostbyaddr and gethostbyname library routines for name resolution.
Note: The version of the gethostbyaddr and gethostbyname library routines on this operating system do not support the hostfile.pag and hostfile.dir files.
After creating the host file, you can edit it to include the desired host entries.
-v | Lists each host as it is added to the host file specified by the HostFile parameter. |
Use the following command to generate the /etc/hosts.pag and /etc/hosts.dir files:
mkhosts /etc/hosts
This command creates two host files called /etc/hosts.pag and /etc/hosts.dir.
The gettable command, htable command.
The named daemon.
The gethostbyname subroutine, gethostbyaddr subroutine.
The hosts file format.
Naming in AIX 5L Version 5.2 System Management Guide: Communications and Networks.