• notice
  • Congratulations on the launch of the Sought Tech site

Solve the error of bash: syntax error near unexpected token `(' under linux

Recently during development, I wanted to delete a jar package on the server, but the jar package has parentheses in its name. 
At first I deleted it like this:

rm -f HIBIKI_API(1).jar

But I get the following sentence:

bash: syntax error near unexpected token `(' 

Then I googled it and found that after linux 5.0, parentheses cannot be included, and translation is required at this time. There are two methods of translation:

1.rm -f HIBIKI_API\(1\).jar2.rm -f "HIBIKI_API(1).jar"

This translation is OK.


Technical otaku

Sought technology together

Related Topic


Leave a Reply