Forum Moderators: phranque
ls -lrt /usr/local/apache2/logs/ ¦ grep access ¦ awk '{ print $9}' > /tmp/url.txt
and then,
for i in `cat /tmp/url.txt` ; do cat $i ¦ awk '{ sum = sum + $10 } END {print sum }'; done ¦ awk '{ sum = sum + $1 } END { print sum/1073741824 ,"GB"}';
1.78338 GB
This is what I could do the raw way, but ya, if the log files are very huge for a high traffic facing server, it will spike up the load i think.
..hence still looking for some stable solution out.
~DK