I'd like to get binary information whether two directories differ or not. I don't want to list different files. Just binary result that can be used in "if" statement. How to do this?


I would try

 if diff -q DIR1 DIR2 

If that is still too verbose

if diff -q DIR1 DIR2 > /dev/null
  • Ok! With option -r works great
    – ardabro
    Jan 13 '17 at 9:11

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.