Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Jun 122014
 

Mass resolve ip to hostname

Answer:

If you have a list of IPs and need to resolve to the hostname(via reverse DNS lookup), you can use the following command:

cat ip_addresses.txt | xargs -n 1 -P 100  -i dig -x {} +short

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>