Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


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

Help with log rolling and filenames



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).




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org