On Sun, Apr 21, 2002 at 08:21:09AM +0100, Forever Cheerful wrote:
I tried to overwrite an existing directory by moving a directory with the same name in that location. This fails with a message that the directory already exists or that it cannot overwrite existing directories. How can I over-ride this. The directory I am moving has many subdirectories and I do not want to delete the existing directory because I'm not replacing everything just a subset of its contents. It would literally take hours to replace files individually. I have tried it from the commandline as root with "mv -f" and "mv --force" and from a konqueror window (administrator mode) in KDE3 and get the same result. Anyone have any idea whats going on and how I can over-ride it. Would be very grateful.
Have you considered using rsync? This can efficiently sync files or directories between sites or locally.
From the description: rsync is a program that behaves in much the same way that rcp does, but has many more options and uses the rsync remote-update protocol to greatly speedup file transfers when the destination file already exists. The rsync remote-update protocol allows rsync to transfer just the differences between two sets of files across the network link, using an efficient checksum-search algorithm described in the technical report that accompanies this package.
rsync -r srcdir destdir Theo -- Theo v. Werkhoven ICBM 52 8 24N , 4 32 40E. S.u.S.E 7.3 x86 Kernel 2.4.16-4GB