Pages

Thursday, July 29, 2010

how to touch a file with current DATE as filename

hai try to use these commands to touch a file , with current date as filename

touch $(date)

but this may giv you a bad result, it may creates more files

so use this command

touch $(date +"%C%y%b%d")

C indicates Century 20 , ' y '  means year ,  'b' means month , 'd' is date

 

No comments: