-1

This question already has an answer here:

I had a small question concerning something in Ubuntu. I noticed that whenever I cd to a two-word place, Ubuntu seems to go there. However, when I mention the file path to this place, Ubuntu splits up the text.

Here is the original cd, and, as seen, it can easily go to the specified area.Yet, when I mention the file path to the place, it doesn't work.

As seen, in the first picture, the system can go to the specified place. However, when I mention the file path to the two-word place, Ubuntu seems to split up the two words and search for either of them, which don't exist.

Can someone help?

Note: I have tried '' instead of "" around the file, but it still doesn't work. I am also using the Linux application on Windows (which, yes, I know is very dangerous).

marked as duplicate by dessert command-line Nov 11 '18 at 21:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Do quotes around the WHOLE dir and file please ;) – Rinzwind Nov 11 '18 at 17:09
  • 2
    I learned a long time ago not to use spaces. I use CamelCase, under_score, or justalabel. Then you do not have the issue of escaping or quoting which can be somewhat different depending on where used. – oldfred Nov 11 '18 at 17:14
  • 3
    It looks to me like the error is within your jmf4.pl script – steeldriver Nov 11 '18 at 18:06
  • 2
    Please don't post screenshots of text. Copy the text here and apply code formatting. – muru Nov 11 '18 at 18:46
4

Please use quotation marks around the entire path, this is required when there are folder or filenames containing spaces.

  • The Wildcat " \ " can also be used. Example: Natural\ Pediatrics. – Yufenyuy Veyeh Dider Nov 11 '18 at 20:59
4

Escape spaces in directory or filenames with \ symbol. For example, to change directory to ~/Some Dir use command

cd ~/Some\ Dir

Not the answer you're looking for? Browse other questions tagged or ask your own question.