Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Rsync maintains the original directory nesting relationship to synchronize files

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

rsync -R is a parameter that maintains the nesting of the original directory.

For example, there is an absolute path/root/test/3/4/5/6/7, now

If you want to copy directory 4 and all the contents contained in directory 3 to/tmp/oldfile/while maintaining the nesting relationship of the original directory, cd to directory 3 first, and then execute rsync -avuzRP 4 /tmp/oldfile/.

This applies mainly to cases where there are too many directories in a directory that you don't need, and there are too many directories in a directory nest, and eventually a file, and what you need is not just that file, but the complete directory nesting.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report