SYNOPSIS
hostinfo
[
hostinfo
hostinfo
DESCRIPTION
The hostinfo utility finds and displays the name, IP addresses, and aliases (if any) of each specified host. By default, hostinfo first tries to interpret host as a numeric dotted-quad IPv4 address. If host> doesn't appear to be a numeric IP address, hostinfo assumes it is a host name to look up.
Host information comes from the
When none of
address: 127.0.0.1 hostname: localhost aliases: localhost.localdomain
When you specify one or more of the
127.0.0.1 localhost localhost.localdomain
Some host names map to multiple IP addresses. By default,
hostinfo displays a separate record for each address.
Use the
When
Options
-a --address -
displays only the IP addresses for each host.
-D --expect-decimal -
tries interpret host as a decimal (base 16) IP address, in the normal dotted-quad format nnn.mmm.ppp.qqq (for example, 127.0.0.1). This is the default.
-d --print-decimal -
displays IP addresses in decimal (base 10). This is the default.
-h --help -
displays the built-in usage information.
-l --aliases -
displays only the aliases (if any) for each host.
-N --force-name -
forces host to be interpreted as a host name.
-n --name -
displays only the name of each host.
-O --expect-octal -
tries interpret host as a octal (base 18) IP address, in the format \qqq\rrr\sss\qqq (for example, \177\000\000\001).
-o --print-octal -
displays IP addresses in octal(base 8).
-p --print -
does not attempt to look up host. If host is a valid IP address, hostinfo displays it in the requested format (decimal [default], hexadecimal, or octal)
-V --version -
displays program version, copyright and warranty information.
-X --expect-hexadecimal -
tries to interpret host as a hexadecimal (base 16) IP address, in the format wwxxyyzz (for example, 7f000001).
-x --print-hexadecimal -
displays IP addresses in hexadecimal (base 16).
-1 --first-address -
displays only the first IP address when a host has multiple IP addresses. If a host has only one IP address, that address is displayed.
DIAGNOSTICS
Possible exit status values are:
PORTABILITY
All UNIX systems.
AVAILABILITY
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC MKS Toolkit 10.4 Documentation Build 39.