I am trying to recursively compare a directory in the local host to a directory in a remote linux machine. However, when i execute the next command:
diff -r 'ssh [email protected]:/home/admin' /home/admin
it doesn't work saying:
diff: ssh [email protected]:/home/admin: No such file or directory
what is the right way to compare recursively the directories contents?
Thanks in advance
Using Meld Visual Diff and Merge Tool Click on directory comparison and move to the next interface. Select the directories you want to compare, note that you can add a third directory by checking the option “3-way Comparison”. Once you selected the directories, click on “Compare”.
Click on the “Select Files or Folders” tab in the far left, to start a new comparison. Each comparison you run opens in a new tab. To start a new comparison, click on the “Select Files or Folders” tab in the far left, change the targets and click “Compare” again.
If you needn't diff the detail in file, just get the difference of dir/file name, then try this:
(Note: need set "SSH login without password" , for detail , review this URL: http://www.linuxproblem.org/art_9.html)
diff <(ssh [email protected] ls -R /home/admin) <(ls -R /home/admin)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With