Find log files and copy to a folder

From Wiki

Jump to: navigation, search

Copies all apache log files to a new folder to analyse or run webalizer against etc.

#!/bin/bash
for logfile in `ls /var/log/apache2/ | grep -v gz | grep -v .1`
do
       cp /var/log/apache2/$logfile /var/tmp/apachelog/
done
Personal tools