Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I get only the owner/orgname from a PTR whois lookup? I don't need all the other entires, just the part about ownership (google in this case).

Edit /usr/bin/whois or any ip get OrgName

  # Query terms are ambiguous.  The query is assumed to be:
  #     "n"
  # Use "?" to get help.

  # The following results may also be obtained via:

  NetRange: -
  NetName:        GOOGLE
  NetHandle:      NET-74-125-0-0-1
  Parent:         NET-74-0-0-0-0
  NetType:        Direct Allocation
  RegDate:        2007-03-13
  Updated:        2012-02-24

  OrgName:        Google Inc.
  OrgId:          GOGL
  Address:        1600 Amphitheatre Parkway
  City:           Mountain View
  StateProv:      CA
  PostalCode:     94043
  Country:        US
  RegDate:        2000-03-30
  Updated:        2011-09-24

  OrgAbuseHandle: ZG39-ARIN
  OrgAbuseName:   Google Inc
  OrgAbusePhone:  +1-650-253-0000

  OrgTechHandle: ZG39-ARIN
  OrgTechName:   Google Inc
  OrgTechPhone:  +1-650-253-0000

  # ARIN WHOIS data and services are subject to the Terms of Use
  # available at:
share|improve this question
Well, that edit changed the thrust of the question somewhat. @Rajeev, is it the domain name or the organisation name that you're really after? – nickgrim Sep 14 '12 at 12:09

The WHOIS output is not standardized, so there isn't any toggle to only get the information you're looking for.

What you need is some parsing (grep/sed/awk and so on), and this site is not suited for that. Ask on Stack Overflow instead.

share|improve this answer

If you want the domain name of the owner of an IP-address (rather than, say, a company name), perhaps you might be better served by using dig -x ?

$ dig +short -x

-- EDIT --

If you just want the "OrgName:" line from the whois output, you can single it out with grep:

$ whois | grep OrgName
OrgName:        Google Inc.

As mentioned elsewhere though, this may not always work, since the output-format is not specified anywhere.

share|improve this answer
how to get google domain name using above – Rajeev Sep 14 '12 at 11:54
The domain is owned by Google - not all of Google's services live on a "" domain. Specifically, it's the domain that all Google servers live on, as per – nickgrim Sep 14 '12 at 12:06
but what if i want to query other servers info – Rajeev Sep 14 '12 at 12:10
Feel free to edit the question to list exactly what you're after. – nickgrim Sep 14 '12 at 12:12
i have edited the question – Rajeev Sep 14 '12 at 12:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.