Creating a file with the date in it

I would like to create an archive of backup files
In doing so I would like to be able to create a file basically called


With each try I get something completly different - so how do I get just say zip the entire directory >


Any ideas - I really botched that one - I need to know how to get all the other characters outta the date command and then use it as a variable to make the filename.

hey n9ninchd
I'm not sure if I understood your question, but if you just want the numerical date format you can just specify the date command to be format thus:

`date "+%m%d%y"` which will return 050901 for example (todays date - 9th May 2001)

Hope this helps.


if you have gnu date & tar:
Today=`date +%d-%B-%Y` ��� # 09-May-2001
tar czvf $Today.arch.gz dirname


Thank You to the both of you.
Both scenarios work well, and both work in the areas that I needed.

Once again thank you so much