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.”