The solution to the "-bash: syntax error near unexpected token` ('"error in the centos7 system

Recently I prepared to build a new website (www.appjzw.com), so I uploaded the packaged compressed file to the centos7 system, and then an error occurred when using the tar -xzvf command.

-bash:syntax error near unexpected token `('

Then I found relevant information on the Internet. It seems that after centos 5.0 version, use the tar  -xzvf command to decompress the file. The file cannot be enclosed in brackets, otherwise it will not be decompressed. There are two solutions.

1. Rename the compressed file

You can rename the compressed file and upload it again. For example, I can name the html (1) .tar.gz compressed file as html.tar.gz, so that it can be decompressed after uploading.

2. Translation can be performed. There are two methods for translation:

Ht 、 1.html \ (1) \. Tar.gz

②、2.html"(1)".tar.gz

This is also possible after the above translation.

In the end, the compressed file can be decompressed perfectly.

 

Guess you like

Origin www.cnblogs.com/idpy/p/12746260.html