5

I cannot delete a file in my /home folder.
Terminal output give me the message:

~$ rm /home/goldap/Загрузки/Put Don Kihota (1934) 
   bash: ошибка синтаксиса около неожиданной лексемы '('

Roughly translated:

~$ rm /home/goldap/Загрузки/Put Don Kihota (1934) 
   bash: syntax error near unexpected token '('
0

1 Answer 1

10

As far as I see it, (And google translate tells me) you need to escape ( and ). Like this:

~$ rm /home/goldap/Загрузки/Put\ Don\ Kihota\ \(1934\)

Another way to accomplish this, would be to put it in single-quotes.

~$ rm '/home/goldap/Загрузки/Put Don Kihota (1934)'
4
  • 4
    In fact it should say rm /home/goldap/Загрузки/Put\ Don\ Kihota\ \(1934\). Usually typing the beginning of the file name and pressing the tab key will do the job for you.
    – David
    Mar 13, 2013 at 8:24
  • Whops. My fault. Correcting. Mar 13, 2013 at 8:25
  • putting the path into single quotes should do the same thing, shouldn't it? e.g. rm '/home/goldap/Загрузки/Put Don Kihota (1934)' Mar 13, 2013 at 11:31
  • Single quotes gives the same result, yes. Mar 15, 2013 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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