ML
    • Register
    • Login
    • Search
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups

    Finding a File by MD5 Sum

    IT Discussion
    linux unix find md5 md5sum checksum
    1
    1
    432
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmiller
      scottalanmiller last edited by

      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/

      1 Reply Last reply Reply Quote 3
      • First post
        Last post