Reverse DNS lookup from a file
Hello I have a file consisting of unique IP addresses - one per line
I want to find the name of the host for each address. I tried the following: Quote:
This worked except it gives me a lot of extraneous information such as the servers providing the answers. This is too much information for me and would simply like each line of IP numbers to be replaced with a domain name. I tried using the same strategy using host and hostname and dig but I must have given the wrong command as I had no results. I would appreciate advice. Thanks Andrew |
for i in `cat file_name `; do host $i; done|awk '{print $5}'
|
Code:
dig +short -f filename Code:
-x 1.2.3.4 |
nifty :}
|
All times are GMT -5. The time now is 01:25 PM. |