May I know how can I compare content of two files? I tried these codes below but I get this message:

sh: diff: No such file or directory.

The commands that I tried are:

plink.exe -l admin -pw abc123 -batch sh diff -s "/share/MD0_DATA/BackupData/test1.txt" "/share/MD0_DATA/BackupData/test2.txt"
plink.exe -l admin -pw abc123 -batch sh diff -s /share/MD0_DATA/BackupData/test1.txt /share/MD0_DATA/BackupData/test2.txt
  • please ssh to your host ans find the diff executable with whereis diff or type diff. If exists, you may edit your plink line with the full path for diff. On Ubuntu it should be /usr/bin/diff – cmak.fr Jul 22 at 5:16
  • you may also remove the sh word – cmak.fr Jul 22 at 5:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.