タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

設定とdiffに関するatm_09_tdのブックマーク (1)

  • サーバ間でdiffをとる方法 · DQNEO日記

    複数サーバ間の設定ファイルを比較したいときはこうすればよいです。 ローカルファイルとリモートサーバのファイルを比較 $ 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日記
  • 1