[PLUG] filename with date redux

Mike De La Mater mikedela at ipns.com
Mon Apr 14 09:50:02 UTC 2003


I'm still tweaking a backup script.

So far I'm good with:
mkdir -p /home/ofsbu_`date +%y%m%d`
cd /home/ofsbu_`date +%y%m%d`

This makes the dir I put the files into and gets the files in the
correct dir. Works like a charm.

Now, I want to compress the dir into a single file with the date and
name intact. I've changed the script to drop the date and then compress
it with the date in the filename, but no workee.

I've tried zip but it won't let me specify the date as a filename:
zip -mR9 ofsbu-`date +%y%m%d`.zip ofsbu/'

Is there a way to make zip put the date in?

Is there a better way to do this?

Mike







More information about the PLUG mailing list