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.

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:
    16
  2. hydra

    hydra Well-Known Member

    Joined:
    Mar 26, 2008
    Messages:
    102
    Likes Received:
    1
    Trophy Points:
    18
    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:
    16
    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:
    14,446
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Is it writable by server?
     
  5. meeti

    meeti Well-Known Member

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

    Hi,

    i had changed to 600

    thanks
     
  6. meeti

    meeti Well-Known Member

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

    i fixed by

    thanks
     
  7. meeti

    meeti Well-Known Member

    Joined:
    Dec 25, 2007
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    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:
    18
    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:
    38
    Yes..there should be ">" between echo and /var/log/messages
     
  10. meeti

    meeti Well-Known Member

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


    i got it,


    thanks to all.
     
Loading...

Share This Page