[lug] Converting IPs to Domain Names and Vice Versa via Bash

Daniel Webb lists at danielwebb.us
Thu Jan 27 11:55:28 MST 2005


On Wed, Jan 26, 2005 at 04:53:54PM -0700, Jeff Schroeder wrote:

> > Does anyone know if there's a simple bash command that can take a
> > domain name as input and spit out its IP? Also, can I go the other
> > way?

> To do a reverse lookup, you probably want the 'dig' command (with a -x 
> argument, for reverse):
> 
> # dig -x 216.239.39.99

I second this.  If you want to play with DNS, learn how to use dig.
It's extremely powerful, and allows you to query any DNS server in just
about any way possible.



More information about the LUG mailing list