# Linux – how to check whether two directories differ (no file list)

bash-scriptingcommand linelinux

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?

 if diff -q DIR1 DIR2

if diff -q DIR1 DIR2 > /dev/null