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!

need some help in grep cmd

Discussion in 'General Discussion' started by whm-expert, May 14, 2014.

  1. whm-expert

    whm-expert Active Member

    Joined:
    Nov 10, 2012
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    DataCenter Provider
    Hello

    I want to grep all home directory(all website) for this word "version".
    i am use the command below and its work successfully.
    grep -RPnDskip "(version) *\(" /home/*/public_html


    Now i want to use the same command to grep all home directory(all website) for this word "version" except the USER (portal) there for i try to use "exclude-dir" but its not work

    grep --exclude-dir=/portal/data/ -RPnDskip "(version) *\(" /home/*/public_html

    i want to exclude this path /home/portal/data/



    please can any one help me to fix the command?



    Best regards
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,396
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

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