This question: Why cat, grep and other commands can't understand files starting with minus sign? was marked as duplicate of this question: How do I delete a file whose name begins with "-" (hyphen a.k.a. dash or minus)?

disclaimer: I posted an elaborate answer for the why-question.

The text of the how-question is straight forward: how to solve the problem?

The text of the why-question reads more like a rant. One sentence in the text actually does ask how to solve the problem. The title is, IMO, dominating the question: why does the problem exists?

If it really is a duplicate then when the answers are merged the answers of one question should also answer the other question. In this case my answer for the why-question feels very out of place in the how-question. As well as the answers for the how-question feel very incomplete in the why-question.

Is it policy that why-questions are generally considered duplicate of how-questions?

If I edit the text of the why-question to remove that little reference to "how" and enfore the "why", would it be reopened?

share
    
People tend, rightly or wrongly, to mark new questions as duplicates of old ones. I liked your answer as it focuses on teaching the principles behind command line options. However, this is a really common problem and most people looking for the solution would appreciate a shorter answer. So I can see it either way. –  Jon Ericson Aug 21 '13 at 14:46

1 Answer 1

The question is not really asking why cat --1 isn't working: the asker did understand that this was because cat is interpreting --1 as an option. The real question is

Is there any universal workaround different from not using such file names?

So yes, the question is a duplicate. Unfortunately, the earlier question has pretty poor answers, inherited from the early days of the site, with a lot of upvotes but not much in the way of explanations. Your answer is a lot better (though still incomplete, as you don't explain the peculiarity of - or why quotes don't help).

There's no rule that the newer question has to be closed as a duplicate of the older one. It's the typical case, but in general the question with the worse answers should be closed as a duplicate of the question with the better answers. So we should invert the duplicate closure.

(Unless there's already another better duplicate? I thought I remembered an answer by Stephane Chazelas that went through all of this, but I can't find it.)

share
    
I disagree with you about the "real question". I think the title is the real question. Alas, only the question asker could answer that. –  lesmana Aug 21 '13 at 19:40

You must log in to answer this question.

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