Help with log rolling and filenames

Scott Ehrlich scott at MIT.EDU
Sun Jul 16 08:28:04 EDT 2000


Hello to all:

I'm working on a bash script to roll a log and give the rolled log a name
of rolled_file_date_rolled.   

The line I am using is:

mv /path/to/file_to_roll /path/to/rolled_file_date_rolled

Question is, how can I set up my variables to permit the timestamp to be
appended at the end of the rolled file's filename?   
I'm using date '+%m%d%y' for date retrieval.

Also, if the format of the mv line above is wrong for whatever reason (may
you see I am missing something), please offer ideas :-)

In the end, it will be part of a cron job already to go (but commented
out).

Thanks.

Scott

-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).



More information about the Discuss mailing list