linux - Compare directories with ssh -


i have directory dira on laptop, , directory dirb on remote host can ssh. both directories include subdirectories.

i compare full content of 2 subdirectories using ssh. in particular, want know file or subdirectory in dira not in dirb, , other way around. 2 directories large enough not want transfer full files through ssh, compare names , locations.

do know how this?

thank you.

use rsync --dry-run option; like:

rsync -ar --dry-run local-dir/ user@remote:remote-dir 

this output list of files would have been synchronized. if there no output; there no difference.

edit : 2 options might consider:

  • --ignore-times : ignore timestamp of local , remote files when comparing files.
  • --size-only : if want speedup rsync command. rsync compares size of files. note error prone (files same size might differ)
  • --itemize-changes : show changes between files

you may take @ this anwser


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -