1

I have to open a directory from terminal but the directory name contains a single quote, how Can I open it? Here is the name of the directory

02. Setting Up 'Shop
2
  • You forgot to tell us what OS you're using.
    – Daniel Beck
    Mar 19, 2012 at 5:44
  • remotely accessing CentOS from Mac terminal
    – coure2011
    Mar 19, 2012 at 5:54

2 Answers 2

5

Either escape spaces and the quote with \, or wrap the whole directory name in double quotes.

3

suround the directory name with quotes

$ cd "02. Setting Up 'Shop"

or mask the 'special' characters

$ cd 02.\ Settings\ Up\ \'Shop
4
  • -bash: 33m]ommand not found -bash: 31m: command not found
    – coure2011
    Mar 19, 2012 at 6:57
  • 2
    a dot doesn't have to be escaped. Mar 19, 2012 at 8:16
  • 1
    @coure2011: what exactly did you enter to get that error message back? Quoted string or using escape sequences ('\')? And you don't enter the '$' in the beginning. These commands are used to color the terminal output ([0;33m -> yellow, 0;31m -> red). You can try to set a minimalistic prompt, eg. export PS1='\h:\W \u\$'. Or to check your prompt: echo "$PS1"
    – boretom
    Mar 19, 2012 at 9:43
  • @danielkullmann: Of course you're right, sill me :)
    – boretom
    Mar 19, 2012 at 10:05

You must log in to answer this question.

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