Page 2 of 2

Posted: Fri Jul 14, 2006 8:37 am
by DSguru2B
mdtauseefhussain wrote: What if we want to bring the date format like this with file name

Sample 2006-07-14 22:25:30.txt
I would still suggest to get rid of the space in between. But if you really want a space then use this

Code: Select all

date +"%Y-%m-%d %H:%M:%S"

Posted: Fri Jul 14, 2006 10:03 am
by mdtauseefhussain
When i try this (date +"%Y-%m-%d %H:%M:%S") it is not working iam getting this error

" Output from command was: ***
mv: |11:01:39.txt not found
the jos is throwing warnings

Posted: Fri Jul 14, 2006 10:12 am
by DSguru2B
Told you. THe space is creating the problem.
replace the space from between by maybe a dot.
use this

Code: Select all

date +"%Y-%m-%d.%H:%M:%S"