Welcome to WebmasterWorld Guest from 22.214.171.124
Forum Moderators: bakedjake
I have a server with many sites configured using Mass Virtual Hosting [httpd.apache.org] and apache2 is set to log to one single file (for all hosts) each day using the 'Combined' format (i.e. with the hostname at the start of each log entry), the file is called vhost.YYMMDD and is autogenerated each day.
Before processing, I need to split these logfiles using Apache's split-logfile [httpd.apache.org] command, is there an easy way to run this on every file in a folder?
BTW, running split-logfile < /var/log/apache2/vhost.* doesn't work - I've already tried :-(
find /var/log/apache2/vhost.* -exec split-logfile
Double check that syntax, at least you get an idea though.
You may want to ask this question in the *nix forum. There are some bright admins that hang out there that may have a better solution.