Skip to content

Instantly share code, notes, and snippets.

@xai
xai / find-by-hash.sh
Last active March 13, 2019 18:16 — forked from mloberg/gist:3750653
Find file in git based on md5 checksum.
#!/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"