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!

error_log command line question

Discussion in 'General Discussion' started by xman888, Jul 7, 2013.

  1. xman888

    xman888 Well-Known Member

    Joined:
    Nov 23, 2005
    Messages:
    58
    Likes Received:
    1
    Trophy Points:
    158
    Hello,

    Is there a command that I can run from the command line for my vps, that will list all of the error_log files on the vps, with how much space each one takes up?

    Kind regards,
    Anthony
     
  2. xman888

    xman888 Well-Known Member

    Joined:
    Nov 23, 2005
    Messages:
    58
    Likes Received:
    1
    Trophy Points:
    158
    I found a way to find all client error_logs over 10MB:

    find /home -type f -size +10000k -name "error_log"
     
  3. PlotHost

    PlotHost Well-Known Member

    Joined:
    Apr 29, 2011
    Messages:
    255
    Likes Received:
    2
    Trophy Points:
    68
    Location:
    Romania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Indeed "find" command does the job.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,392
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    You could also try a command such as:

    Code:
    find /home -type f -name "error_log" -print0 | xargs -0 du -sh
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. xman888

    xman888 Well-Known Member

    Joined:
    Nov 23, 2005
    Messages:
    58
    Likes Received:
    1
    Trophy Points:
    158
    thanks guys :)
     
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