How can I easily confirm in Linux that two separate directories have the exact same contents?
- by Mike B
CentOS 5.x
Mq question seemed similar to this one but I wasn't sure...
I have two servers (completely isolated from each other), each with a directory and sub-directories that should have the same exact contents.
For example the directory layout could be something like:
SERVER A -
/opt/foo/foob/1092380298309128301283/123.txt
/opt/foo/foob/5094380298309128301283/456.txt
/opt/foo/foob/5092380298309128301283/789.txt
/opt/foo/foob/1592380298309128301283/abc.txt
SERVER B -
/opt/foo/foob/1092380298309128301283/123.txt
/opt/foo/foob/5094380298309128301283/456.txt
/opt/foo/foob/5092380298309128301283/789.txt
/opt/foo/foob/1592380298309128301283/abc.txt
Ideally I'd like a way to do a recursive check and have something confirm that everything matches.
I also want to avoid using any third-party tools.
Any ideas?