Commonly used log files are as follows:
access-log records HTTP/web transmissions
acct/pacct records user commands
aculog records MODEM activities
btmp record failed record
lastlog records the last few successful login events and the last unsuccessful login
messages log information from syslog (some links to syslog files)
sudolog records commands issued using sudo
sulog records use of su command
syslog records information from syslog (usually linked to messages file)
utmp records each user currently logged in
wtmp A permanent record of each user's login entry and exit time
xferlog records FTP session
Direct delete log:
1. Delete all logs: find/var-typef-execrm-v{}\\; (the last semicolon is also part of the mandatory command)
2. Set /etc/logrotate.d The /syslog file controls the size of the log file.
3. If you really want to manually empty some log files, you can use the command: >/var/log/message. The function of this command is to empty the contents of the file message. You can also add this command to the cron task.
linux detailed log parsing:
The unix system log files are usually stored in the "/var/logand/var/adm" directory. Usually we can look at syslog.conf to see the log configuration. Such as: cat /etc /syslog.conf
where sunos is under /var/log and /var/adm. There is /usr/adm for /var/adm link.
Redhat is in /var/log and /var/run.
Below is a sample of the logs in sunos5.7.
#ls/var/adm
acctlogmessages.1passwdsulogvold.log
aculogmessagesmessages.2sautmpwtmp
lastlogmessages.0messages.3spellhistutmpxwtmpx
# Ls/var/log
authlogsyslogsyslog.1syslog.3
sysidconfig.logsyslog.0syslog.2syslog.4
The following is a sample of the logs in redhat6.2.
#ls/var/log
boot.logdmesgmessages.2secureuucp
boot.log.1htmlaccess.logmessages.3secure.1wtmp
boot.log. 2httpdmessages.4secure.2wtmp.1
boot.log.3lastlognetconf.logsecure.3xferlog
boot.log.4mailllognetconf.log.1secure.4xferlog.1
cronmaillognetconf.log .2sendmail.stxferlog.2
cron.1maillog.1netconf.log.3spoolerxferlog.3
cron.2maillog.2netconf.log.4spooler.1xferlog.4
cron. 3maillog.3newsspooler.2
cron.4maillog.4normal.logspooler.3
daily.logmessagesrealtime.logspooler.4
daily.shmessages.1sambatransfer.log
#ls/var/run
atd.pidgpm.pidklogd.pidrandom-seedtreemenu.cache
crond.pididentd.pidnetreportrunlevel.dirutmp
ftp.pids-allinetd. Pidnewssyslogd.pid
Generally, the logs we want to clear are
lastlog
utmp(utmpx)
wtmp(wtmpx)
messages
syslog
************************************* ************************************************** **************
In Apple Mac OS and Microsoft Windows have supported multi-touch today, the Linux open source commun
Too many open files Errors are common faults in Linux systems. Solutions can be easily found on the
Requirement Description Set SNAT policy using iptables Make hosts on 192.168.100.0/24 network segmen
Think about it, what if you want to change the size of an image to a smaller size? Of course, I will
How to safely delete PV physical volumes (hard disks or partitions) in Linux LVM
How Linux uses inode to delete files
Install the unmount file system
Quickly switch Nginx as a website front-end proxy server
Connect the USB flash drive to the VMware virtual machine Tutorial
Linux system /etc/fstab loss, mount LVM repair
View and modify the linux file time touch
WinXP has a Null error when playing LOL login
Win8 boot into the traditional desktop tutorial
Is it really feasible to accelerate the Win7/Win8 system on the USB flash drive?
How does Win8 create a storage pool?
Win10 Start menu "Key Error" solution
What if the Win10 super administrator can't open the Modern app?
Windows 8 will be transferred to beta test later this month
How to enable or disable the built-in positioning function of Win10 by default