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!

echo > /var/log/exim_mainlog

Discussion in 'General Discussion' started by meeti, Jul 16, 2008.

  1. meeti

    meeti Well-Known Member

    Joined:
    Dec 25, 2007
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    66
  2. hydra

    hydra Well-Known Member

    Joined:
    Mar 26, 2008
    Messages:
    102
    Likes Received:
    1
    Trophy Points:
    68
    Location:
    Amsterdam, Netherlands
    Hi,

    With the echo command you empty the file.
    With the rm command you remove the file.

    Ronald.
     
  3. meeti

    meeti Well-Known Member

    Joined:
    Dec 25, 2007
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    66
    Hi,


    sure,


    i get a problem,

    i "rm" the file "messages" in /var/log and "touch messages" later,

    but there is no new record in the messages anymore,

    how can i fix it?


    thanks
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,311
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Is it writable by server?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. meeti

    meeti Well-Known Member

    Joined:
    Dec 25, 2007
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    66

    Hi,

    i had changed to 600

    thanks
     
  6. meeti

    meeti Well-Known Member

    Joined:
    Dec 25, 2007
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    66
    Hi,

    i fixed by

    thanks
     
  7. meeti

    meeti Well-Known Member

    Joined:
    Dec 25, 2007
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    66
    Hi,


    but i run "echo /var/log/messages",

    it only shows
    but i run "ls -al",it file size of messages is the same,

    and the records in the file are not been emptied at all.



    thanks
     
  8. DaveUsedToWorkHere

    DaveUsedToWorkHere Well-Known Member

    Joined:
    Dec 28, 2001
    Messages:
    689
    Likes Received:
    1
    Trophy Points:
    318
    You missed the '>'. What the command is doing is sending the output of the echo command to the file /var/log/messages. In this case, the output is blank so it replaces the file with an empty one:

    Code:
    echo > /var/log/messages
     
  9. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    68
    Yes..there should be ">" between echo and /var/log/messages
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. meeti

    meeti Well-Known Member

    Joined:
    Dec 25, 2007
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    66
    Hi,


    i got it,


    thanks to all.
     
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