Perform a reverse DNS lookup

dig -x 74.125.45.100
Performs a reverse DNS lookup, variants include: nslookup 74.125.45.100 or: host 74.125.45.100
Sample Output
; <<>> DiG 9.4.3-P3 <<>> -x 74.125.45.100
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21635
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 0

;; QUESTION SECTION:
;100.45.125.74.in-addr.arpa.	IN	PTR

;; ANSWER SECTION:
100.45.125.74.in-addr.arpa. 85534 IN	PTR	yx-in-f100.google.com.

;; AUTHORITY SECTION:
125.74.in-addr.arpa.	83550	IN	NS	NS4.google.com.
125.74.in-addr.arpa.	83550	IN	NS	NS1.google.com.
125.74.in-addr.arpa.	83550	IN	NS	NS2.google.com.
125.74.in-addr.arpa.	83550	IN	NS	NS3.google.com.

;; Query time: 1011 msec
;; SERVER: 10.10.10.1#53(10.10.10.1)
;; WHEN: Mon Sep 28 17:04:36 2009
;; MSG SIZE  rcvd: 151

4
2009-09-28 15:13:34

3 Alternatives + Submit Alt

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: