Skip to content

Instantly share code, notes, and snippets.

@xai
xai / find-by-hash.sh
Last active Mar 13, 2019 — forked from mloberg/gist:3750653
Find file in git based on md5 checksum.
View find-by-hash.sh
#!/bin/sh
usage() {
echo "Usage: $0 [-m] [-s] hash file"
echo "\t-m use md5 for hashing"
echo "\t-s use sha1 for hashing (this is the default)"
exit 1
}
HASHCMD="sha1sum"