Use dig instead of nslookup

dig google.com
It is a much better tool then nslookup for getting information about the any site.It has got better capability too.For reverse information please use the switch "-x" and the ip address.
Sample Output
sudo /usr/bin/dig google.com

; <<>> DiG 9.4.1-P1 <<>> google.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11120
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 4, ADDITIONAL: 4

;; QUESTION SECTION:
;google.com.                    IN      A

;; ANSWER SECTION:
google.com.             27      IN      A       74.125.127.100
google.com.             27      IN      A       74.125.45.100
google.com.             27      IN      A       74.125.67.100

;; AUTHORITY SECTION:
google.com.             113531  IN      NS      ns3.google.com.
google.com.             113531  IN      NS      ns2.google.com.
google.com.             113531  IN      NS      ns1.google.com.
google.com.             113531  IN      NS      ns4.google.com.

;; ADDITIONAL SECTION:
ns1.google.com.         12140   IN      A       216.239.32.10
ns2.google.com.         12140   IN      A       216.239.34.10
ns3.google.com.         186240  IN      A       216.239.36.10
ns4.google.com.         186240  IN      A       216.239.38.10

;; Query time: 675 msec
;; SERVER: 202.138.103.100#53(202.138.103.100)
;; WHEN: Fri Aug 28 10:06:09 2009
;; MSG SIZE  rcvd: 212

-1
2009-08-28 04:32:52

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: