[thelist] Help please from a Shell Scripter
Jake Aust
mail_lists at jakesdiner.com
Mon Aug 26 12:15:01 CDT 2002
Hi...
I've got what I think is a simple task, and yet I can't seem to quite get
it.
I want to run a daily cron job that finds all occurences of a file named
"access_log.1" within all my virtual site's log directories and rename them
to a datestamped version such as "access_log.2002-08-26"
I am trying to get the command to work at the command prompt first and this
is where I am stuck. What I am working with so far is as follows:
find /home/virtual/*.*/var/log/httpd/old_logs -name access_log.1 -print |
rename 's/\.1/\.`date '+%Y-%m-%d'`'
and I get the following error:
call: rename from to files...
Is there an easier way to do this than what I am attempting?
Thanks in advance,
Jake Aust
More information about the thelist
mailing list