diffdir recursively compares the contents of two directory trees. Files are compared by reading the files and comparing them byte-for-byte. All files, including hidden and system files, are compared.
diffdir switches... dir1 dir2
The output of the program will list files that are different from dir1 to dir2, prefixed by a character:
|-||File exists in dir1 but not in dir2.|
|+||File exists in dir2 but not in dir1.|
|#||File exists in both dir1 and dir2 but has different contents.|
It's useful for:
- Verifying that a backup actually does contain exactly the same files with the same content.
- Determining what files in a release package have changed from one version to the next.
- Determining what files on a disk were modified by an installation program (by comparing with a backup).
- Detecting if files on a disk were tampered with by comparing with a known good backup.