• When the process that generates the log under Linux is not closed, delete the log file, and the space will not be released
  • Although restarting the process is enough, it may cause service interruption
  • The file can be emptied by the following methods

     echo '' > foo.log
    # 或
    echo > foo.log
  • Find open deleted files

     sudo lsof | grep deleted
This article is from qbit snap

qbit
268 声望279 粉丝

引用和评论

0 条评论