choccarlm
asked on
Back ups
Hi, I've a written a small shell script that tar's certain directories and then moves the tar files to a backup directorie. Is it possible to add the time /date at the beginning of the tar files? I.E If the tar file is called website.tar, would it be possible using shellscript to call that file (date)20012210(&)(time)110 0website.t ar? I.E 200122101100website.tar. Meaning the backup was made at 11:00 on October 22nd 2001.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
bash, sh, ksh% date=`date +%Y%d%m%H%M`; tar cf backup-$date.tgz
csh, tcsh% set date = `date +%Y%d%m%H%M`; tar cf backup-$date.tgz
csh, tcsh% set date = `date +%Y%d%m%H%M`; tar cf backup-$date.tgz
ASKER