複数サーバ間の設定ファイルを比較したいときはこうすればよいです。 ローカルファイルとリモートサーバのファイルを比較 $ ssh remotename cat /etc/hosts | diff /etc/hosts - こういう書き方もあります。 $ diff <(ssh remotename cat /etc/hosts) /etc/hosts リモートサーバ間のファイルを比較 $ diff <(ssh remote1 cat /etc/hosts) <(ssh remote2 cat /etc/hosts) 解説 ssh hostname cat /path/to/file "cat /path/to/file"というコマンドを別サーバ(hostname)上で実行させて、結果を自マシンの標準出力に出力します。 diff /path/to/file - diffで、ファイル名を指定する代
![サーバ間でdiffをとる方法 · DQNEO日記](https://cdn-ak-scissors.b.st-hatena.com/image/square/8f7de7c0278993661a11fbc3637f96292ba773aa/height=288;version=1;width=512/http%3A%2F%2Fdqn.sakusakutto.jp%2Fimages%2Fkali.jpg)