Skip to content

Instantly share code, notes, and snippets.

@bollwyvl
Created September 15, 2010 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bollwyvl/581515 to your computer and use it in GitHub Desktop.
Save bollwyvl/581515 to your computer and use it in GitHub Desktop.
#~/bin/bash
# usage:
# ./hash_finder.sh <hash_file> <location>
# Finds all files in a given location whose hashes appear in an a given file
find "$2" -type f -print0 | xargs -0 sha1sum | grep -e "`sed 's/^/^/' $1`"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment