Linux Log cleanup

Source: Internet
Author: User
Tags syslog

Linux Log cleanup

Due to data requirements, data needs to be captured and filtered frequently. It took about seven or eight months to modify the data on the machine and restart the machine. The system found that "No space left on device"

Solution:

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

In addition, common log files are as follows:
Access-log records HTTP/web transmission
Acct/pacct record user commands
Aculog records MODEM activities
Btmp record failure record
Lastlog records the last successful logon events and the last unsuccessful logon events.
Messages records information from syslog (some links to the syslog file)
Sudolog records commands issued by using sudo
Sulog logs the use of the su command
Syslog records information from syslog (usually linked to the messages file)
Utmp records each user currently logged on
Wtmp a permanent record of the entry and exit times of a user upon each login
Xferlog records FTP sessions

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.