Creates an LDAP Data Interchange Format (LDIF) file from a hosts file.
hosts2ldif [ -i InputFile ] [ -o OutputFile ] [ -s SearchBase ]
The /usr/sbin/hosts2ldif command creates a LDAP Data Interchange Format (LDIF) file from /etc/hosts or another file that looks like /etc/hosts. With no flags, the /etc/hosts file is used to create the /tmp/hosts.ldif LDIF file using cn=hosts as the baseDN.
-i InputFile | Specifies the hosts file used for input. |
-o OutputFile | Specifies the LDIF file used for output. |
-s SearchBase | Specifies the baseDN of the host table on the LDAP server. |
hosts2ldif -o /home/ldifhosts
hosts2ldif -i /home/hosts.bak
hosts2ldif -o /home/ldifhosts -s cn=hosttab
/etc/hosts | Contains the Internet Protocol (IP) name and addresses of hosts on the local network. |
TCP/IP Name Resolution in the AIX 5L Version 5.1 System Management Guide: Communications and Networks.