Linux log cleanup

  

Due to data requirements, it is necessary to frequently fetch and filter filtered data. It took about 7 8 months to change the data on the machine, restart, and found “No space left on device”

Workaround:

Directly delete logs (simple and rude): Delete all logs: find /var -type f -exec rm -v {} \\; (The last semicolon is also part of the command)

Another: commonly used log files are as follows: access-log record HTTP/web transmission acct/pacct record user command aculog record MODEM activity btmp record failure record lastlog record the last few successful login events and The last unsuccessful login message logs information from syslog (some links to syslog file) sudolog Record the command issued by sudo sulog record using the su command syslog record information from syslog (usually linked to the messages file) utmp record each user currently logged in wtmp a permanent record of each user login and exit time xferlog record FTP Conversation

Copyright © Windows knowledge All Rights Reserved