you have your commands out of order.
you need to use cut on the original file to extract just the md5 values, 
then pipe that to sort | uniq -c | sort -nr
to generate a list of md5 values with their counts of how often they occur. 
 counts greater than 1 indicate duplicates.

>From that, select each md5 value with counts > 1 then use grep to find that 
md5 with its names in the original file.
On Saturday, January 6, 2024 at 10:00:48 AM UTC-5 K otgc wrote:

> Thanks.
> I ran these commands, and I'm up to the final step of using those hash 
> values to look up all the matching filenames in the original md5 file.
> I'm researching a command for that, as command fdupes seems to be for 
> files, but I need to match up the md5 hash values?
> ubuntu@ubuntu:~/Documents$ find -H test1/ ! -type d -exec md5sum {} + > 
> sum.md5
> ubuntu@ubuntu:~/Documents$ ls
> NoMachine  sum.md5  test1  test2
> ubuntu@ubuntu:~/Documents$ cat sum.md5 
> 3bc3be114fb6323adc5b0ad7422d193a 
>  test1/test1.1/test1.1.1/test1.1.1file2.JPG
> 126a8a51b9d1bbd07fddc65819a542c3 
>  test1/test1.1/test1.1.1/test1.1.1file1.JPG.json
> 3e7705498e8be60520841409ebc69bc1 
>  test1/test1.1/test1.1.1/test1.1.1file1.JPG
> d8e8fca2dc0f896fd7cb4cb0031ba249 
>  test1/test2/test2.2/test2.2.2/test2.2.2file1.JPG
> 126a8a51b9d1bbd07fddc65819a542c3 
>  test1/test2/test2.2/test2.2.2/test1.1.1file1.JPG.json
> d8e8fca2dc0f896fd7cb4cb0031ba249 
>  test1/test2/test2.2/test2.2.2/test2.2.2file1.JPG.json
> ubuntu@ubuntu:~/Documents$ sort|uniq -c|sort -nr sum.md5 |cut -d ' ' -f1
> 126a8a51b9d1bbd07fddc65819a542c3
> 126a8a51b9d1bbd07fddc65819a542c3
> 3e7705498e8be60520841409ebc69bc1
> 3bc3be114fb6323adc5b0ad7422d193a
> d8e8fca2dc0f896fd7cb4cb0031ba249
> d8e8fca2dc0f896fd7cb4cb0031ba249
>
> On Friday 5 January 2024 at 01:14:24 UTC+10 jr wrote:
>
>> hi, 
>>
>> On Thu, 4 Jan 2024 at 13:11, K otgc <[email protected]> wrote: 
>> > Diff worked, similar to Meld, with a clear list of what files (photos) 
>> are in or not in directories. 
>> > I'm stuck on the command to extract just the md5 values? 
>> > Directory with photo files -> find -H directoryName/ ! -type d -exec 
>> md5sum {} + >sum.md5 -> select Enter -> sort | uniq -c | sort -nr 
>> checksum’sFileName.md5 -> select Enter -> not sure how to extract just the 
>> md5 values? 
>> > 
>> > ubuntu@ubuntu:~/Documents$ cat sum2.md5 
>> > 3bc3be114fb6323adc5b0ad7422d193a 
>> test1/test1.1/test1.1.1/test1.1.1file2.JPG 
>>
>> the command you're looking for is 'cut(1)', eg '$ cat sum2.md5 | cut -d' 
>> ' -f1'. 
>>
>> -- 
>> regards, jr. 
>>
>> You have the right to free speech, as long as you're not dumb enough 
>> to actually try it. 
>> (The Clash 'Know Your Rights') 
>>
>> this email is intended only for the addressee(s) and may contain 
>> confidential information. if you are not the intended recipient, you 
>> are hereby notified that any use of this email, its dissemination, 
>> distribution, and/or copying without prior written consent is 
>> prohibited. 
>>
>

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/9c3cbad4-6708-4434-b8c1-c2bd5357d498n%40googlegroups.com.

Reply via email to