> This implies that 'host' deals only in names and would therefor make 'host > 127.0.0.1' undocumented behavior. However, the man page also says:
<SNIP> > This, on the other hand, implies that 'host' does deal in IP addresses. > Looks like a bug in the man page. this is a little old (i've been lazy with the email), but host does most certainly work with ip#'s. eg. [11:23am] badger(larry)> host 209.112.156.52 Name: badger.alaska.net Address: 209.112.156.52 the reason that it worked with 127.0.0.1 and not with localhost that you have a 'search' or 'domain' parameter setup in your '/etc/resolv.conf' file so it appended 'yourdomain.com' to localhost... and failed. you'll notice that if you look for 'localhost.' (where the trailing dot means don't cannonify this addresses) it will resolve from your '/etc/hosts' file (assuming you have /etc/nsswitch.conf setup to use files for the hosts entry). eg. [11:25am] badger(larry)> host 127.0.0.1 Name: localhost Address: 127.0.0.1 [11:25am] badger(larry)> host localhost localhost.alaska.net does not exist (Authoritative answer) [11:25am] badger(larry)> host localhost. localhost A 127.0.0.1 some people have a localhost.theirdomain.com setup, in which case all three of the above would work, but obviously you don't :-) adam. ------------------------ Internet Alaska ------------------------ 4050 Lake Otis Pkwy Adam Shand (v) +1 907 562 4636 Anchorage, AK 99508 Systems Administrator (f) +1 907 562 4807 ------------------- http://www.underrealm.net -------------------