In macOS, show the difference of 2 folders / files in the Command Line
In macOS, you can compare and show the differences of files in two folders in the Command Line by using the diff command.
With folders you use rq as an argument and pass in the 2 folder names on the command line like so…
diff -rq folder_1 folder_2
You will get notifications on what same corresponding files are different, as well as notifications of what files are unique in each folder. Once you know what files are different you then can run the diff file command on those to see the actual difference.
With files you can pass these in to the Terminal/command line with diff like so…
diff file_1 file_2
For files you can also use the great online tool Diff Checker.