cronosplit(1m)
β¨ cronosplit(1m) β¨
okay bestie, buckle up π this is the manual page for cronosplit, and it lives in section 1m of the manual (iykyk). it's a whole mood and also a whole log-splitting tool, so let's get into it π«Ά
πΈ NAME πΈ
cronosplit β split log files into cronolog-compatible files π
π SYNOPSIS π
cronosplit --template=TEMPLATE [--print-invalid] [--help] [--version]
file ...
π¦ DESCRIPTION π¦
so cronosplit is a simple little program (iconic behaviour, honestly) that reads lines from a set of input log files β and those files must be in Common Log Format or NCSA Combined/XLF/ELF Format, no exceptions bestie β and writes each line out to an output file. π
the name of that output file? constructed using the template you specify plus the timestamp from the line itself. it's giving β¨customisedβ¨.
and the template uses the same format specifiers as the Unix date(1) command β which are literally the same as the standard C strftime library function. no cap. π
β¨ Options β¨
cronosplit accepts the following options and arguments, bestie, here's the full list, no skips:
--template=TEMPLATEβ specifies the template for the output log files (using the format specifiers described below π).--print-invalidβ print invalid log file entries to the standard error stream. π’--utimeβ update modification time of output file according to last parsed log entry.--verboseβ print additional status messages to the standard error stream.--debugβ print debug messages to the standard error stream. π--helpβ print a help message and then exit. bye bestie π«Ά--versionβ print version information and exit.
π Template format π
okay so here's the tea: every single character in the template represents a character in the expanded filenameβ¦ except for the date and time format specifiers, which get replaced by their expansion. π«
a format specifier is a % followed by one of these characters:
%β a literal%characternβ a new-line charactertβ a horizontal tab character
π Time fields:
Hβ hour (00..23)Iβ hour (01..12)pβ the locale's AM or PM indicatorMβ minute (00..59)Sβ second (00..61, which allows for leap seconds) β yes fr fr, sixty-one, leap seconds are realXβ the locale's time representation (e.g.:"15:12:47")Zβ time zone (e.g.GMT), or nothing if the time zone cannot be determined π
πΈ Date fields:
aβ the locale's abbreviated weekday name (e.g.:Sun..Sat)Aβ the locale's full weekday name (e.g.:Sunday .. Saturday)bβ the locale's abbreviated month name (e.g.:Jan .. Dec)Bβ the locale's full month name, (e.g.:January .. December)cβ the locale's date and time (e.g.:"Sun Dec 15 14:12:47 GMT 1996")dβ day of month (01 .. 31)jβ day of year (001 .. 366)mβ month (01 .. 12)Uβ week of the year with Sunday as first day of week (00..53, where week 1 is the week containing the first Sunday of the year)Wβ week of the year with Monday as first day of week (00..53, where week 1 is the week containing the first Monday of the year)wβ day of week (0 .. 6, where0corresponds to Sunday)xβ locale's date representation (e.g. today in Britain:"12/04/96")yβ year without the century (00 .. 99)Yβ year with the century (1970 .. 2038)
other specifiers may be available depending on the C library's implementation of the strftime function. so like, vibe check your libc, bestie π§
π SEE ALSO π
apache(1m) cronolog(1m) date(1) strftime(3) environ(5)
more information and the latest version of cronolog and cronosplit can be obtained from
http://www.ford-mason.co.uk/resources/cronolog/
if you have any suggestions, bug reports, fixes, or enhancements, please mail them to the author. π¬ (they're nice, promise)
π More about Apache π
documentation for the Apache http server is available from
http://www.apache.org
β AUTHOR β
Andrew Ford <A.Ford@ford-mason.co.uk>
cronosplit is based on a script called splitlog by Roy Fielding, which is part of the wwwstat package. shoutout to the OGs π«Άβ¨
and that's the whole thing bestie, no crumbs left π this was the cronosplit(1m) page, dated March 1998, and it's lowkey a classic. periodt. πππ
π¦ where this page comes from
- debian bookworm: cronolog 1.6.2+rpk-3 Β· GPL-2.0-or-later
- debian trixie: cronolog 1.6.2+rpk-5 Β· GPL-2.0-or-later
- ubuntu jammy: cronolog 1.6.2+rpk-3 Β· GPL-2.0-or-later
- ubuntu noble: cronolog 1.6.2+rpk-4 Β· GPL-2.0-or-later
- ubuntu questing: cronolog 1.6.2+rpk-5
- ubuntu resolute: cronolog 1.6.2+rpk-6 Β· GPL-2.0-or-later
- ubuntu stonking: cronolog 1.6.2+rpk-6 Β· GPL-2.0-or-later
- Copyright (c) 1999 Apache Software Foundation
- Copyright (c) 1997-1999 Andrew Ford and Ford & Mason Ltd
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms