# Linux: Compare Directory Structure Without Comparing Files

comparisonlinux

What is the best and simplest way to compare two directory structures without actually comparing the data in files? This works fine:

diff -qr dir1 dir2_


But it's really slow because it's comparing files too. Is there a switch for diff or another simple cli tool to do this?

find directory1 -type d -printf "%P\n" | sort > file1