あるディレクトリから別のディレクトリにログを継続的にコピーする方法はありますか?

あるディレクトリから別のディレクトリにログを継続的にコピーする方法はありますか?

特定のディレクトリにログファイルがあります/A。ファイルのファイルを更新すると、ファイル全体を/B書き換えることなくファイルのファイルも更新されることを考慮すると、ディレクトリの同じ内容を保持することは可能ですか?/A/B

ベストアンサー1

定期的なアップデートが利用可能な場合は、次のものを使用できますrsync --append

rsync --append source destination
--append
          This  causes rsync to update a file by appending data onto the end of
          the file, which presumes that the data that  already  exists  on  the
          receiving side is identical with the start of the file on the sending
          side. 

十分でない場合は、この--append-verifyオプションを試すこともできます。

おすすめ記事