サーバ間でdiffをとる方法

 
$ 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-
 <(command)
cat <(date)

PHP,Tips - Qiita  
カテゴリ: