rsync to keep the original directory nesting relationship synchronize files

rsync -R nesting relationship keep the original directory parameters.
For example there is the absolute path / root / test / 3/4 /5/6/7, and now
wants to 4 wherein the 3 catalog directory and everything contained inside, maintaining the original directory to copy a nesting relationship / tmp / oldfile / 3 on the first cd to the directory, then execute rsync -avuzRP 4 / tmp / oldfile /

This is mainly used, it does not require too many directory contains a directory, the directory and the directory set too many directories is ultimately a file, you need not just the file, but to complete the directory nesting relationship situation .

Guess you like

Origin blog.51cto.com/zhukeqiang/2444480