Skip to content

Instantly share code, notes, and snippets.

@timabell
Last active Jun 4, 2022
Embed
What would you like to do?
hashdeep orchestrator for data integrity checks in home folder
#!/bin/sh -v
cd ~
hash_file="Documents/hashdeep-checksums.txt"
mv "$hash_file" "$hash_file.bak"
time hashdeep -c md5 -of -r -l Music Downloads Documents Pictures Phone Dropbox repo oneplus9-home | tee "$hash_file"
#!/bin/sh
cd ~
hash_file="Documents/hashdeep-checksums.txt"
output_file="Documents/hashdeep-checksums-verification.txt"
mv "$output_file" "$output_file.bak"
time hashdeep -k "$hash_file" -rle -of Music Downloads Documents Pictures Phone Dropbox repo oneplus9-home -avv | tee "$output_file" | grep "Known file not used"
xed "$output_file" &
echo '"Known file not used" means there was no match for this hash, i.e. deleted file'
echo '"No match" means new/modified file'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment