[NTLUG:Discuss] tar file with date?

m m llliiilll at hotmail.com
Tue Aug 5 10:39:16 CDT 2008


I am trying back the while directory with tar.
I want to have current date append to the backed up file name.
Google result is 

tar cvf backup_`date +%d%m%y`.tar

however, it just don't work on my box.
I have tried 

tar cvf backup_${date +%d%m%y}.tar

this is what I get:

bash: date_%y%m%d: command not found

Can any one  help?

the systems are Fedora 7 and  Fedora 8

Thanks.



_________________________________________________________________
Got Game? Win Prizes in the Windows Live Hotmail Mobile Summer Games Trivia Contest
http://www.gowindowslive.com/summergames?ocid=TXT_TAGHM


More information about the Discuss mailing list