Find the answer to your Linux question:
Results 1 to 3 of 3
I have a large list of IPs that I need to lookup and get the resolved hostname for, its from an .htaccess file thats become outdated with time. As an ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2011
    Posts
    2

    Resolving Mass IPs


    I have a large list of IPs that I need to lookup and get the resolved hostname for, its from an .htaccess file thats become outdated with time. As an example, one of them is 67.16.94.2 which returns smtp.gigablast.com .

    Is there a quicker / easier way to resolve the ip to hostname rather than my current method? Right now its either manually entering each one in dnsstuff.com or using dig -x ip and theres several thousand to go. Thanks

  2. #2
    Just Joined!
    Join Date
    Mar 2007
    Location
    Bogotá, Colombia
    Posts
    46
    Well, if you have a file with all the addresses in each line, you could run a little loop to seek each address:

    cat youriplist.txt | while read IP ; do nslookup $IP ; done

  3. #3
    Just Joined!
    Join Date
    Jan 2011
    Posts
    2
    Thank you, thatll work great for what I need.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •