Usage: hostinfo [-a] [-n] [-l] [-1] [-{x|o|d}] [-{X|O|D|N}] [-p] [...] hostinfo --help hostinfo --version Find and print name, IP address(es), and aliases (if any) of each specified host. By default, first try to interpret as a numeric dotted-quad IPv4 address. If doesn't appear to be a numeric IP address, assume it is a hostname to look up. The -N option forces to be interpreted as a hostname. Host information comes from the gethostbyname(3) and/or gethostbyaddr(3) function calls. These function calls use some combination of both the "hosts database" (usually, '/etc/hosts' and/or NIS/NIS+), and, if available, the system's DNS resolver. What combination and in what order is configured in an operating-system dependent manner (and is outside the scope of this program). If none of -a, -n, or -l are given, host information prints out in a well-labelled, human-readable format. For example: address: 127.0.0.1 hostname: localhost aliases: localhost.localdomain If you use one or more of the -a, -n, or -l options, host information prints in a more compact format, with requested fields separated by tab characters. For example: 127.0.0.1 localhost localhost.localdomain Note that some hostnames map to multiple IP addresses. By default, hostinfo prints a separate record for each address. Use the -1 option to cause only the first address to be printed. The -p option causes hostinfo to interpret each host as an IP address, skip the lookup stage, and print the address in the requested format. Together with the -x/-o/-d and -X/-O/-D options, this turns hostinfo into a quick tool for converting between IP address formats. Options: -a, --address Print only the IP address(es) of each host. -n, --name Print only the name of each host. -l, --aliases Print only the aliases, if any, for each host. -1, --first-address If a host has multiple IP addresses, only display the first one. -x, --print-hexadecimal Print IP addresses in hexadecimal (base 16). -o, --print-octal Print IP addresses in octal (base 8). -d, --print-decimal Print IP addresses in decimal (base 10). This is the default. -X, --expect-hexadecimal Try to interpret as a hexadecimal (base 16) IP address, in the format 'wwxxyyzz' (e.g., 7f000001). -O, --expect-octal Try to interpret as an octal (base 8) IP address, in the format '\qqq\rrr\sss\ttt' (e.g., \177\000\000\001). -D, --expect-decimal Try to interpret as a decimal (base 10) IP address, in the normal dotted-quad format 'nnn.mmm.ppp.rrr' (e.g., 127.0.0.1). This is the default. -N, --force-name Don't try to interpret as an IP address; assume each specified host is a hostname. -p, --print Don't try to look up ; if it's a valid IP address, print it in the requested format (decimal [default], hexadecimal, or octal). -h, --help Display this builtin usage information. -V, --version Display program version, copyright, and warranty information.