Options of move files

Matt McCutchen hashproduct at gmail.com
Wed Jul 12 12:38:08 GMT 2006

On 7/11/06, Ahmed Ibn Fahdlan <d13warrior at msn.com> wrote:
> What i want are is , if we move the files on SRC from dir A to B. If we do
> sync it will still continue syncing on DEST  dir A.

If B on the source and A on the destination are the only directories
involved, you can just do something like:
    rsync -a src/B/ dest/A/
However, if you are also synchronizing other directories that have the
same name on both sides, I don't know of any rsync command that will
map these other directories unchanged while mapping B on the source to
A on the destination.  The best you could do in that case would be to
run rsync once from src/B/ to dest/A/ and again from src/ to dest/
with appropriate exclude filters.

(GNU tar recently gained a --transform=SED-SCRIPT option that will
make it transform filenames as it reads or writes an archive.  It
would be very cool if rsync offered a similar transformation step
between file scanning on the sender and the file list; that would
allow pretty much arbitrary mapping of directories.  However, enabling
this step would dramatically increase the sender's memory usage since
it would have to store two versions of each filename.)


More information about the rsync mailing list