2

Currently
How do I enter a directory with special characters in its name?
is the canonical1 question for quoting problems, however I feel it has a number of problems:

  • it doesn't mention file names, but only directory names
    This is the same thing of course, but I think the question title and body should at least mention file names as well. People could think files were different.
  • it doesn't list all three ways of quoting in one place
  • it doesn't explain the difference between quoting with single and double quotes
    unless you read through comments, but then again this one doesn't mention arithmetic as well as history expansion and this information shouldn't be in comments only after all
  • the top two answers both escape , while that's unnecessary
  • it provides neither sources nor further reading links

To improve this situation I wrote this question and answered it as good as I'm able to:
How do I enter a file or directory name containing spaces or special characters in the terminal?
I included a tl;dr section at the top of the answer to account for the fact that users might not want to read about the topic but just get to the solution.

While I was still on it, Sergiy jumped in after having a boring day and was happy to write a mind-blowing second answer covering amazing alternative approaches.

I think this question should be the new canonical one and would like to hear your opinion about that.
If you think it's appropriate please also consider casting a reopen vote.

1 – “Canonical” meaning “That's the question where duplicates link to.”

  • I see three options: No – leave everything as it is; Merge – merge the new answers into the old question and edit it (see muru's answer); Yes – maybe edit and improve the new one. – dessert Dec 11 '17 at 8:16
  • IMHO, it's perfectly fine to have it closed as duplicate, and leave comment with link to your post as "related question". Either can be indexed by search engines, therefore either way people will find both. – Sergiy Kolodyazhnyy Dec 12 '17 at 1:30
4

This is the same thing of course, but I think the question title and body should at least mention file names as well.

Edit away. Any number of questions have been edited to be more general over the years.

it doesn't list all three ways of quoting in one place

Add a new answer. Wait, you already did. Elsewhere. Why? Seeing an insufficient answer, why didn't you post one there? Or in How to access files/directories with spaces in the name?, which you then VTC'd?

it doesn't explain the difference between quoting with single and double quotes

See above.

the top two answers both escape , while that's unnecessary

See above.

it provides neither sources nor further reading links

See above.


Personally, I'd just rather see your answers merged there.

  • If I do such a major edit to any of the existing questions the existing answers won't fit any more, that seems unfair and I didn't dare – do you really consider changing a specific question to adress the issue generally the best way? How would you choose which? – dessert Dec 11 '17 at 8:23
  • 1
    @dessert that's why I also linked to another question. That one explicitly mentions filenames – muru Dec 11 '17 at 11:25

You must log in to answer this question.

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