How to compare two directories thoroughly without git

diff()files

Here thoroughly means “list all differ files, find those files with same name and different content, list the difference of content”.

Before I got a lazy solution, git init one directory and copy another directory into it. Then using git diff to view the difference.

But I wonder there is another more smart way to do this? Thus I raised this question.

Best Answer

diff -Naur dir1/ dir2/

Pretty useful for submitting software patches, incidentally: diff -Naur orig/ patched/ > my_changes.diff

Related Question