GnuDeveloper.com

How to compare two folder which has n Sub Folders and Files

For that we have to make use of Find,Sort ,Diff command as follows

Code:

find ./ -name "*.*" | sort > file_1.txt
find ./ -name "*.*" | sort > file_2.txt
diff file1_sort.txt file2_sort.txt

First we have run the find command in one folder & store in file_1.txt
then we have run the find command in anoter folder & store in file_2.txt
then just run the command diff file 1 file2

Groups: