Thursday, January 4, 2024

Re: DirDiffVim for folders, but files are missed?

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
126a8a51b9d1bbd07fddc65819a542c3  test1/test1.1/test1.1.1/test1.1.1file1.JPG.json
3e7705498e8be60520841409ebc69bc1  test1/test1.1/test1.1.1/test1.1.1file1.JPG
ubuntu@ubuntu:~/Documents$ sort | uniq -c | sort -nr sum2.md5
126a8a51b9d1bbd07fddc65819a542c3  test1/test1.1/test1.1.1/test1.1.1file1.JPG.json
3e7705498e8be60520841409ebc69bc1  test1/test1.1/test1.1.1/test1.1.1file1.JPG
3bc3be114fb6323adc5b0ad7422d193a  test1/test1.1/test1.1.1/test1.1.1file2.JPG

On Thursday 4 January 2024 at 03:38:08 UTC+10 rwmit...@gmail.com wrote:

I'd recommend using something like md5 to generate unique hash values for every file into a single file.
From that, extract just the md5 values and pipe to " sort | uniq -c | sort -nr"
This will generate a list of hash values reverse sorted by how often they occur. 
Anything occurring more than once, is duplicated (and will be near the top of the output).
Use those hash values to look up all the matching filenames in the original md5 file.

Of course, all of this will fail when anything minor (such as meta data) changes in a photo.

On Wednesday, January 3, 2024 at 11:44:29 AM UTC-5 meine wrote:
On Tue, Jan 02, 2024 at 03:27:28PM -0800, K otgc wrote:
> Thanks, I actually did use Meld, great GUI.
> However, the sorting process needs digital automation.
> Manually moving 1000's of files on several accounts is too slow and I
> haven't figured out how Meld could do that?

For automation regular `diff` seems a more appropriate tool. You can
call it in a script, etc.

//meine

--
--
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 vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/c34de60e-c706-472f-ad69-c5ffa5eff209n%40googlegroups.com.

No comments: