The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page