Reduce log file

Discussion in 'Server Operation' started by tashman89, Aug 6, 2017.

  1. tashman89

    tashman89 Member

    Hello dears ,

    can you please advise me by how I can reduce large log file .

    Br
     
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    To empty it you can use something like "> filename.log".
     
  3. tashman89

    tashman89 Member

    Thanks ahrasis for your reply but can please explain with more details
     
  4. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Reducing a large log file means to empty it and for that we normally type into the terminal the above mention command. We have two options if it is in certain path other than the current directory. First, we can specify the path while emptying the file i.e. via "> /path/to/file/filename". Second, we can go to the file directory via "cd /path/to/file" and run the command in the earlier post above.
     
  5. sjau

    sjau Local Meanie Moderator

    better to use log rotation.
     

Share This Page