James Courtier-Dutton wrote:
> Hi,
>
> I have two large directories that should be the same but might not due
> to file system problems.
> Does anyone know of a program that can compare two directories and all
> sub directories?
> I tried sha1sum , but it does not have a recurse option.
>
> Any other tools out there.
>
diff -qr dir1 dir2
Recursively prints out a line if the contents of files with the same
name differ, or if files are only in one directory. As in:
sar@reginald:~$ ls -l a1/
total 9024
-rw-r--r-- 1 sar sar 6 2008-06-24 21:41 aa1
-rw-r--r-- 1 sar sar 124181 2008-06-24 21:41 aa2
-rwxr--r-- 1 sar sar 9083705 2008-06-24 21:42 aa3
-rw-r--r-- 1 sar sar 6 2008-06-24 21:44 aa4
sar@reginald:~$ ls -l a2/
total 9020
-rw-r--r-- 1 sar sar 7 2008-06-24 21:42 aa1
-rw-r--r-- 1 sar sar 124181 2008-06-24 21:42 aa2
-rwxr--r-- 1 sar sar 9083705 2008-06-24 21:42 aa3
sar@reginald:~$ diff -qr a1 a2
Files a1/aa1 and a2/aa1 differ
Only in a1: aa4
sar@reginald:~$
Simon