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 πŸ’…βœ¨