[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] Re: RAQ4 web.cache files getting HUGE



At 08:59 AM 04/05/2004 -0500, you wrote:
With many domains, it isn't practical to manually go through and delete
these files. Is there a setting for maximum size or some way to automate the
process that would be simple to maintain, as I add and remove domains from
the RAQ4?

You can use this script, run from a monthly cron job to clear the logs.

Name the script something like "delete_logs.sh" and make it executable.

Here is the script:
--------------------------
#!/bin/bash
# clear all logs for each site

for URL in $( find /home/sites -type l -maxdepth 1 | sed -e 's/\/home\/sites\///g' ); do
        echo --Removing logs for $URL...
        ls -lah /home/sites/$URL/logs
        rm /home/sites/$URL/logs/*
        echo
done

echo Completed
--------------------------

The script is everything between the --- lines.

Cheers,
- Bill






---------------------------------
William J.A. Brillinger
Precision Design Co.

E-Mail:   mailto:billy@xxxxxxxxxx
Web site: http://www.pdcweb.net


---------------------------------
DO *NOT* SEND EMAIL TO THIS ADDRESS
UNLESS YOU ARE A SPA*MMER: mailto:stmail@xxxxxxxxxx
---------------------------------