0
I have a script to backup some directories:
tar cjf /backup-`date +\%m-\%d-\%Y`.tar.bz2 mydir >> /dev/null 2>&1
At the end of the process, a "ls -al" show something like:
-rwxr-xr-x 1 my my 719110144 May 29 2000 backup-08-02-2013.tar.bz2
Notice the year: 2000. Archive was made in 2013… What's the problem and how to solve it?
Thanks for your help.
Have you checked the date & time of the computer (using
date
)? :-) – Cristian Ciupitu – 2013-08-30T00:21:10.573@CristianCiupitu: The filename tells us the output from
date +%m-%d-%Y
. – Scott – 2013-08-30T01:20:44.200