Calculates digest of files recursively found under directories.
This script is useful for comparing sets of files, to see if they are the same or not. If the output of the script is different, then the two sets of files are different. For example, checking if a copy is the same as the original.
rdigest [options] {pathname...}
The pathname can be a path to either a file or a directory. If a directory is specified, all the files under it are processed. If multiple pathnames are provided, they are all processed in the order supplied.
--quick
: Uses the size of files instead of calculating digests of the file's contents.
Much faster, but less useful (see Limitations section below).
--baseless
: Output filenames without the base path.
--verbose
: Show total number of files processed.
--output
filename
: Write output to specified file.
--help
: Show a brief help message.
These options can be abbreviated (e.g. -q
for --quick
).
./rdigest.pl --output dir1.dgst --baseless dir1
./rdigest.pl --output dir2.dgst --baseless dir2
diff dir1.dgst dir2.dgst
If the results are different, then some/all of the the files are different between dir1 and dir2. If the results are the same, then they could be considered to be the same (see Limitations for a discussion about what "same" actually means).
If the baseless option was not specified, the directory names "dir1" and "dir2" will be included in the entries, which will mean the diff will always be different.
- OpenSSL development libraries.
Please report bugs and send suggestions to Hoylen Sue at [email protected].