1

I tried to remove a folder in linux, davidanderson'spetshop_617 as a folder name. It contained a single quotes. By using the following command

     rm -r path/davidanderson'spetshop_617

I am getting this error

Error: unexpected EOF while looking for matching `'' unexpected end of file

How can i remove the folder?

1

2 Answers 2

6

you should issue

rm -r path/davidanderson\'spetshop_617
5

Wrap double quotes around the path:

rm -r "path/davidanderson'spetshop_617"

or escape the single quote in the path:

rm -r path/davidanderson\'spetshop_617

You must log in to answer this question.