Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Getting ONLY addon domains list - not subdomains!

Discussion in 'General Discussion' started by garak, Aug 11, 2008.

  1. garak

    garak Active Member

    Jan 23, 2004
    Likes Received:
    Trophy Points:

    I saw here in this forum the following command to get a list of a user's domains:

    cat /var/cpanel/users/user | grep DNS | awk -F [=] '{print $2}'

    And it works!

    The only problem is that I only need the first level domains names, not the subdomains.

    For example... the command above prints everything:

    And I just need:

    Someone can help me?

    Thank you so much in advance!

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice