[TriLUG] Reverse Lookup Using /etc/hosts

Tarus Balog tarus at opennms.org
Wed Apr 25 16:50:19 EDT 2007


On Apr 25, 2007, at 4:46 PM, Alexei Znamensky wrote:

> I could swear that ping would do the trick, but it doesn't. You can  
> always
> do it the dirty way:
>
> grep "^${IP_NUMBER}" /etc/hosts | awk '{ print $2 }'
>
> Sorry I dont have anything better right now.

Thanks. To be specific I need the Java getHostByName command to  
resolve by /etc/hosts. Prolly much harder. (grin)

-T

_______________________________________________________________________
Tarus Balog, OpenNMS Maintainer             Main:   +1 919 533 0160
The OpenNMS Group, Inc.                     Fax:    +1 503 961 7746
Skype: tarusb                               Direct: +1 919 647 4749
Email: tarus at opennms.org                    URL: http://www.opennms.org
PGP Key Fingerprint: 8945 8521 9771 FEC9 5481  512B FECA 11D2 FD82 B45C





More information about the TriLUG mailing list