[ale] copy with dynamic rename
Ron Mellema
ale at netherealm.net
Fri Sep 22 16:18:23 EDT 2000
On Fri, 22 Sep 2000, Andreas [iso-8859-1] Köpp wrote:
> Hi!
> I've got to copy and gzip all files of an directory with a cronjob but
> the files got to be renamed in a way that the result looks like this:
> originalname.<date>.gz
I am no expert but I did this with advice of an expert. Below is a sample
of a bash script that runs from cron
#!/bin/sh
PURGE=`date '+%y%m%d'`
cp /var/log/warn /var/log/oldlogs/warn.$PURGE
Ron Mellema
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
More information about the Ale
mailing list