Linux Commands Examples

A great documentation place for Linux commands


Split combined virtual hosts access log into one file per virtual host


split-logfile < logfile

add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!



split-logfile < /var/log/apache2/other_vhosts_access.log

    phf_abuse_log.cgi split-logfile envvars-std
+CLEAN_TARGETS = suexec suexec-custom
PROGRAMS = htpasswd htdigest rotatelogs logresolve ab htdbm htcacheclean httxt2dbm $(NONPORTABLE_SUPPORT)


This script will take a combined Web server access log file and break its contents into separate files. It assumes that the first field of each line is the virtual host identity (put there by "%v"), and that the logfiles should be named that+".log" in the current directory.

The combined log file is read from stdin. Records read will be appended to any existing log files.

How can this site be more helpful to YOU ?

give  feedback