Last Updated: February 25, 2016
· jpiasetz

Diff over ssh

It's sometime helpful to compare config files on different machines. Here is a one liner that can do it:

diff /etc/hosts <(ssh hydrogen "/etc/hosts") 

This is my goto for checking whether my computers have the same packages install

diff <(pacman -Q) <(ssh kate "pacman -Q")

Even better is watching it while you change

watch 'bash -c "diff <(pacman -Q) <(ssh kate \"pacman -Q\")"'