Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
bashスクリプトにリストしたファイルをrsyncでコピーしてから、ソースディレクトリに存在しないファイルを削除できるようにしたいと思います(スクリプトのファイルリストを変更した場合)。コマンドを展開すると、次のようになります。
rsync -axSR --delete src_dir1/file1 src_dir2/file2 dst_dir/
ただし、rsync は余分なファイルを削除していません。これを行う方法はありますか?
この構文では、複数のソースを使用しており、それらのソースが実際のファイルであることが原因である可能性があります。
src_dirの親ディレクトリをに同期しないのはなぜdst_dirですか?
src_dir
dst_dir