How to diff directories over ssh

前端 未结 4 1036
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-22 22:39

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          


        
4条回答
  •  眼角桃花
    2020-12-22 23:09

    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 admin@10.0.0.10 ls -R /home/admin) <(ls -R /home/admin)
    

提交回复
热议问题