9

This question:

Can any of the diff/grep utilities do a "file grep"?

Was voted for close as an exact duplicate of

Which duplicate files and folders finders exist for Windows?

The OP suggests that while the answer is the same, the question is different. The original question specifically asks for two features, whereas the new question asks for a different feature. However, the answers provided to the original question includes the different feature asked for in the new question.

So the questions ares slightly different but the answer works for both.

I contend that someone searching for the answer to the second question would come across the first question, and find their answer even if it wasn't what the first OP asked for.

I do see what the OP is saying, I just don't see what value the new question has to SU. It seems to me that the original question could be edited to incorporate the new requirements to make the question more valuable, but that compromises what the first OP was asking for.

What is the best approach here?

  • Related topic. – Daniel Beck Dec 2 '11 at 6:52
  • Well that does seem to cover this topic and similar pretty well. – Paul Dec 2 '11 at 8:00
  • The difference is that it's not broadening in scope, and that the requirement of the "file grep" topic allows for significant optimization, which I was too lazy for, but still. For example, you can skip calculating any file's checksum if its size is not the same as the "needle" file's. General purpose duplicate utilities would need to calculate checksums as soon as two files' sizes are identical. Given enough files (a reasonable broadening of scope: not 100 files, but 100 thousand), this makes a big difference. – Daniel Beck Dec 2 '11 at 8:10
  • Yeah - the doubles utility in the vtc answer does just that. It compares hash when the sizes match, otherwise it would be there forever. – Paul Dec 2 '11 at 8:26
  • If the reference file is 20kB, any other doubles utility will still compute checksums of two indentically sized 20GB files, which is unnecessary in this case. – Daniel Beck Dec 2 '11 at 11:59
  • "doubles" is an actual duplicate file finder that clearly states it does not do this - it meets the requirements of the question and is in the vtc answer. – Paul Dec 2 '11 at 13:07
6

Disclaimer: I was the OP mentioned.

Unless we're going to introduce the policy of closing different questions as duplicates, based on the fact that they may have a few same answers, I object to this. There are enough closing policies that it's hard to keep track of them as it is!

When one searches for a solution, one doesn't search answers ... he searches questions that are most most similar to the problem he (or, with respect, she :) is having. Let's say, he is interested in what editors have MATLAB highlighting. Now, his search will go somewhere along the lines of MATLAB highligting or Editor highlighting. He will in most probability not search, nor visit the question What is MATLAB good for? where I've mentioned that Vim is a editor with good highlighting support for that language.

Correlation does not imply causation!

p.s. The questions I've mentioned are here just as examples, to illustrate the point at hard. I've no idea whether they exist, or have the hinted answers.

  • 1
    If your question were to be closed, it wouldn't be to punish you or something like that. While a big percentage of closed questions in a user's profile is a bad sign, the occasional duplicate or borderline on/off topic question is pretty common. We'd be closing one of these questions to keep order. The site has reached a stage where, while your issue is different enough from the other user's, it might make sense to create a reference topic on finding duplicate files. We'd probably need to heavily edit the other question (I mean, seriously, file name and size only?) in order to merge them. – Daniel Beck Dec 2 '11 at 18:32
  • @Idigas - it isn't a policy, but it seemed close enough to consider closing. We are a community that is creating a resource of information and we all (I hope) want the overall value of the site to increase over time, rather than decrease. This one of the purposes of meta, to allow us to come to a conclusion. The difficulty I have is that when searching for answers to my own questions, I often find multiple similar questions and answers, and having to trawl through them represents a decrease in value. Discussing these things is the only avenue we have to make them better. – Paul Dec 5 '11 at 3:10
  • @Idigas I think you'll find this with any community site, that different approaches are taken over time to try and steer the path toward the site increasing in value as a resource. Sometimes those changes are for the better, sometimes they don't work as intended. This is not a reason to avoid change however. – Paul Dec 5 '11 at 12:12
  • @Paul - Couldn't say ... – Rook Dec 5 '11 at 12:27
6

While I try to be impartial here, one of the answers to the "duplicate" is mine. So keep this in mind.

This issue is not straightforward.

The older topic

  • requires matching based on name and file size
  • of all files in a given set (i.e. pairwise comparison)

The newer topic

  • requires matching of file contents only
  • requires the ability to set a reference file (at least as filter)
  • does not require pairwise comparisons of all files, and only needs comparisons to a reference file

So, clearly, it was not wrong of @ldigas to ask the question. We cannot reasonably require our users to evaluate answers to totally different questions.


Regarding on how to act on it, it just isn't easy.

There are a few simple possibilities:

  • Leave both questions as they are. They are different, after all.
  • Close as duplicate. Anyone finding this newer question will be lead to the other question and hopefully find that the answer works.

The problem with both approaches is, that as a general policy, they just don't work. And the reason for this is that both of you are somewhat right. Yes, it's a different question, and yes the answers still apply on the newer question as well.

The only obvious requirement to any solution is that these questions be linked, something that already happened with voting to close as duplicate. All questions on the site show a side bar with similar and linked questions. If one question is linked to from another's thread, even if just in a comment, it will show up on both question pages.


If you feel strongly about almost duplicate topics in general, you can do as Gareth did and get the community to participate in reviewing questions and acting on them (closing, in this case). Of course, merging questions in any sort of useful manner is a lot more work!

In any case, you can bring a perceived problem to attention on Meta (I guess you know that by now). For issues such as this one, you could do the following:

  1. Make absolutely sure you understand both questions and understand their answers — not just the ones already posted, but also the ones likely to be posted!
  2. Wait a while (2+ days, as we're not in a hurry). People can surprise you with their answers, or their willingness to close.
  3. Think about that a useful merger would look like. The exact wording, if at all possible. What should the question be stating? Would both questions be treated fairly? Would answers to both questions still apply?
  4. Ask for opinion. While not nearly as frequented as the parent site, we have a few users participating on Meta, enough for you to see what others think of your suggestion.
  5. Act as would make sense based on the feedback you get on Meta.

Now, this is the general case. Back to the question.

The major issue here is that perfectly acceptable answers to one question don't work for the other. Only rather configurable (read: download and run a program) approaches will be good answers. But users might prefer the shell one-liner (or Excel solution, or VBS script, or obscure virtual file system entries, or whatever else is simple and already on their system) to the all powerful 50$ shareware, or even to the just as capable freeware, and for good reason (IT department policies come to mind).

In this case, I don't think it's duplicate enough to warrant a simple close. You might be able to create a merged topics, but it will quite a bit of work, as outlined above.

2

If we imagine that in the future X other individuals will have the same question as question A and Y other individuals will have the same question as question B, I would argue it makes sense to allow both pathways to lead both X and Y to an answer to their problems versus hoping that one or the other can either reconceptualize or reword their question from A to B (or vice versa), or stumble upon the other question and realize it fits their needs.

Seems like duplication in this case is a small price to pay for the usefulness of the same answer in two different contexes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .