[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Getting hostname



On 04-May-03, 20:28 (CDT), Bob Proulx <bob@proulx.com> wrote: 
> Steve Greenland wrote:
> > Dig only works with DNS. The host solution works with /etc/hosts and
> > (probably) NIS. Depending on the application, this may be an issue.
> 
> Hmm...  I thought host and dig were two sides of the same coin.  I
> just checked with an experiment and host (neither one) returns
> information from /etc/hosts but only from DNS.

Hmmm, you're right. I don't think it used to that way, and on the the
system I just tested (AIX 4.3), it works "properly". I thought host was
supposed to call gethostbyname() or gethostbyaddr(), not do direct DNS
lookups. Oh well, learn something new every day.

If not, I'm not sure of the point of having both 'host' and 'dig' or
'nslookup',

Steve

-- 
Steve Greenland
    The irony is that Bill Gates claims to be making a stable operating
    system and Linus Torvalds claims to be trying to take over the
    world.       -- seen on the net



Reply to: