I'm collecting md5sum
snapshots of the same filesystem at two different points in time. (ie, Before and after an infection.) I need to diff
these two states in order to see what files change between these two points in time.
To collect these states I might do the following (on macOS with SIP turned off):
sudo gfind / ! -path '*/dev/*' ! -path '*/Network/*' ! -path '*/Volumes/*' ! -path '*/.fseventsd/*' ! -path '*/.Spotlight-V100/*' -type f -exec md5sum {} \; > $(date "+%y%m%d%H%M%S").system_listing
The problem I'm having is that the resultant files are around 100MB a piece and using diff
by itself seems to compare chunks instead of each individual file's md5sum
in the output.
Is there an efficient way of using diff
tools to do this or is it necessary to write a script to somehow compare the two files based upon filename paths, effectively recreating diff to compare lines with path as the unique comparator value and then return info based on the associated md5sum
?