Lets say there are two dirs
/path1 and /path2
for example
/path1/bin
/path1/lib
/path1/...
/path2/bin
/path2/lib
/path2/...
And one needs to know if they are identical by contents (names of files and content of files) and if not have differences listed.
How to do this in Linux? Is there some Bash/Zsh command for it?
The diff command can show all the differences between two directories:
diff -qr /path1 /path2
Someone suggested this already but deleted their answer, not sure why. Try using rsync
:
rsync -avni /path1/ /path2
This program will normally sync two folders, but with -n it will do a dry-run instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With