pixelb / fslint

Linux file system lint checker/cleaner
314 stars 74 forks source link

FR: Launch directory comparison tool #157

Open dandv opened 5 years ago

dandv commented 5 years ago

Often when I find two identical large files, they're part of duplicate directories with many other files. It would be super useful to have a button to launch a directory comparison tool (Meld, BeyondCompare etc.) with those two directories as targets.

pixelb commented 5 years ago

Interesting idea, thanks

brightghost commented 5 years ago

I was very intrigued by this suggestion, but after trying it out I'm not sure something like Meld is a good fit for FSLint's workflow. The power of FSLint is in identifying identical files, regardless of filename or path. That's now how Meld works -- I opened two of the directories I'm trying to clean up with an FSLint scan currently, and the bulk of the files flagged as duplicates by FSLint are flagged as 'differences' in Meld because they are in base folders that have different names.

I can't comment on BeyondCompare because it's commercial software, maybe it's more sophisticated. But considering the ideology used for comparison in Meld differs from that of FSLint, this seems to me like it would have limited utility and possibly be dangerously misleading due to the differing definitions of 'sameness'. A more robust tool for handling duplicate/near-duplicate directory trees would be a great addition to FSLint (I'm finding myself wishing for something like a select all from same highest shared based folder option) but I don't think Meld is the answer.

dandv commented 5 years ago

I've been using BeyondCompare indeed, so maybe Meld wasn'ta good suggestion.

How about leaving that up to the user? FSLint could let them define a directory comparison tool, which would be called with the two directories as CLI arguments, much as git lets you define difftool.