SPLIT-LOGFILE(8)
β¨ SPLIT-LOGFILE(8) β¨
okay bestie, so this is a page from the split-logfile manual β section 8, admin-commands energy π
π NAME π
split-logfile β take one big combined virtual hosts access log and split it into one file per virtual host π¦
πΈ SYNOPSIS πΈ
split-logfile < logfile
π SUMMARY π
so here's the vibe: this script grabs a combined Web server access log file and breaks its contents apart into separate files. iconic, honestly. it literally assumes that the first field of each line is the virtual host identity β the one that got put there by "%v" β and that the logfiles should be named that +".log" in the current directory. no cap.
and the combined log file? it gets read from stdin, bestie. π«Ά
β οΈ heads up: records that get read will be appended to any existing log files. not overwritten. appended. periodt.
β EXAMPLES β
split-logfile < /var/log/apache2/other_vhosts_access.log
okay that's the whole page, and it's giving short but mighty π this one came from the Apache HTTP Server crew, dated 2009-12-06 β so go forth, split those logs, and slay π β¨
π¦ where this page comes from
- debian bookworm: apache2-utils 2.4.67-1~deb12u3 Β· Apache-2.0
- debian bookworm: apache2-utils 2.4.68-1~deb12u1 Β· Apache-2.0
- debian trixie: apache2-utils 2.4.67-1~deb13u3
- debian trixie: apache2-utils 2.4.68-1~deb13u1 Β· Apache-2.0
- debian trixie: apache2-utils 2.4.69-1~deb13u1 Β· Apache-2.0
- ubuntu jammy: apache2-utils 2.4.52-1ubuntu4 Β· Apache-2.0
- ubuntu jammy: apache2-utils 2.4.52-1ubuntu4.24
- ubuntu jammy: apache2-utils 2.4.52-1ubuntu4.25 Β· Apache-2.0
- ubuntu noble: apache2-utils 2.4.58-1ubuntu8 Β· Apache-2.0
- ubuntu noble: apache2-utils 2.4.58-1ubuntu8.16
- ubuntu noble: apache2-utils 2.4.58-1ubuntu8.17 Β· Apache-2.0
- ubuntu questing: apache2-utils 2.4.64-1ubuntu3
- ubuntu questing: apache2-utils 2.4.64-1ubuntu3.5
- ubuntu resolute: apache2-utils 2.4.66-2ubuntu2 Β· Apache-2.0
- ubuntu resolute: apache2-utils 2.4.66-2ubuntu2.5
- ubuntu resolute: apache2-utils 2.4.66-2ubuntu2.6 Β· Apache-2.0
- ubuntu stonking: apache2-utils 2.4.68-1ubuntu4 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms