Subj : Re: Can I mirror a directory on the same computer ? To : alt.comp.linux,alt.comp.os.linux,comp.os.linux From : Andy Fraser Date : Sun Oct 31 2004 04:45 am In alt.comp.linux, Mark Hobley uttered these immortal words: > I want to create a script, which will run from a cron job to mirror the > contents of one directory to another. > > Both directories are on the same computer, so I don't want to use rsync, > or fmirror. > > I know that I can use cp -r. > > I would like to copy only files that differ from those in the destination > directory, and I would like files that have been removed from the source > directory to be removed from the destination directory. You don't want to use rsync but what you want *is* rsync. You could write a script to do what you want as Geoffrey suggested but why re-invent the wheel? > Is there a simple way of mirroring directories in this manner ? Yes, use rsync. It's perfectly capable of mirroring directories locally. I should know, I use it for that purpose myself. -- Andy. .