rdns provides a tiny little UNIX utility that will preform reverse dns lookups.
This simple little program takes an IP address as an argument, and spits out the hostname that it finds. It's a simple little program designed to be used in scripts, primarily.
Syntax:
rdns [-s]
Optionally, you can append -s onto the command line. This will prevent rdns from printing any available aliases.
Note: Sometimes rdns will just seem to hang there during the gethostbyname() call. This usually occurs when you try to resolve addresses private IP addresses, like 192.168.*, 10.* and so forth. This is usually BAD for scripting, so try to have all the possible hosts in your /etc/hosts.
Product's homepage