Finding a File by MD5 Sum
-
Sometimes you need to find a file by a matching MD5 Checksum but have no idea where to look and there is no tool for finding a file in this way. This little one liner can help a lot:
find / -name filename -exec md5sum {} \; | grep $sum
Simply replace “filename” with the name of the file that you are looking for and either store the MD5SUM in the $sum variable or replace that variable with the sum itself. It’s that easy. Nothing complex here, just not a technique that everyone has thought to use.
Originally found on my Linux blog in 2014 here: http://web.archive.org/web/20140825114908/http://www.scottalanmiller.com/linux/2014/08/18/finding-a-file-by-md5-sum/