You would do yourself a service to lose the backslashes in the filename you are trying to compose. These will inevitably cause you grief, since these characters get specail treatment in shells and elsewhere. Also, your transcript of the output seems to differ from the code you posted. When I run
Code:
/bin/date "+\%Y-\%m-\%d-\%H-\%M-\%S"
I get
Code:
\2011-\05-\06-\09-\37-\12
I don't know where you are getting the extra leading zero's and the mysterious '%-f' in your output. Did you manually transcribe your posting, or did you use a copy & paste method? Are you sure it is accurate?
Also, the use of the variable 'date' is asking for confusion with the
date command. It is probably better practice to avoid the use of such overlapping uses; perhaps the name 'datestamp' is at least as meaningful.
--- rod.