# # #apache Log Cut
wget http://cronolog.org/download/cronolog-1.6.2.tar.gz
Tar zxf http://cronolog.org/download/cronolog-1.6.2.tar.gz
CD cronolog-1.6.2
Make && make install
Vi/etc/httpd/conf/httpd.conf
#CustomLog/data/logs/httpd/access_log combined modified to read as follows:
Customlog "|/usr/local/sbin/cronolog/data/logs/httpd/access_log.%y%m%d" combined
Effect:
[Email protected] ~]# ll/data/logs/httpd/access_log.20151023
-rw-r--r--1 root root 1602 Oct 15:06/data/logs/httpd/access_log.20151023
Related concepts:
Escape character
%% character
N Line break
T horizontal tab
Time Domain
H Hours (00..23)
I Hour (01..12)
P The AM or PM ID under this locale
M min (00..59)
s seconds (00..61, which allows for leap seconds)
X the time representation under the locale (e.g.: "15:12:47")
Z time zone. Meaningless if the time zone is not determined
Date field
A the name of the weekday under this locale (e.g.: Sun. Sat)
A full name of the working day under the locale (e.g.: Sunday. Satur-ay)
b the month abbreviation under this locale (e.g.: Jan. DEC)
B the full name of the month under this locale (e.g.: January. December)
C Date and time under this locale (e.g.: "Sun Dec 14:12:47 GMT 1996")
D Number of days in the month (01:31)
J Number of days in the current year (001:366)
M number of months (01:12)
The number of weeks in the current year, beginning with Sunday as a week, with the first week of the week including Sunday (00..53)
W the number of weeks in the current year, with Monday as the beginning of the week, the first week of which included the week of Sunday (00..53)
W working days (0:6, 0 = Sunday)
X the date representation under the locale (e.g. "13/04/97")
Y two-digit year (00:99)
Y Four-digit year (1970:2038)
This article from "Technical Cock silk" blog, declined reprint!
Apache Log Cutting