Subj : Re: Can I mirror a directory on the same computer ? To : alt.comp.linux,alt.comp.os.linux,comp.os.linux From : Geoffrey King Date : Sun Oct 31 2004 06:40 pm On Sun, 31 Oct 2004 18:06:10 +0000, Mark Hobley wrote: > In alt.comp.linux Geoffrey King wrote: >> >> if its for backing up, why not use tar? >> > > Can I update only new files, and delete files no longer present in the source > directory from an existing archive ? Well, what I'd suggest you do if you use tar, is have several tarballs. Every time your cronjob runs, you create a new tarball. That way, not only do we not have to worry about updating files and deleting old files we get several versions of files backed up too. That way for any particular file it's possible to go back several versions if you need to. Something along the lines of: DATE=`date +%d%m%G%H%M` cd /yourfiles tar -czf /somewhere/backup.$DATE.tar.gz OLDBACKUP=`ls -t | tail -n1` rm -f $OLDBACKUP Will do the job (feel free to improve my poor shell scripting abilities), fiddle with the filename, paths and date format if you wish. -- panic("If this is a 64-bit machine, please try a 64-bit kernel.\n"); linux-2.6.6/arch/parisc/kernel/inventory.c .