Linux Cookbook

 < Day Day Up > 

16.11.1 Problem

You want to be able to specify filepaths, instead of dumping everything into a single directory.

16.11.2 Solution

Use the -R option:

$ rsync -aR -e ssh /webfiles/site1 stinkpad.test.net:/www/public

This creates /www/public/webfiles/site1, instead of /www/public/site1.

16.11.3 Discussion

This is especially useful when you are transferring several directories and want to maintain separate filepaths for each one.

16.11.4 See Also

  • rsync(1)

     < Day Day Up > 

    Категории