Visit Counter

Wednesday, July 13, 2016

Error with a file name containing parentheses



Solaris 11


When I tried to change file name from abc.file(1).zip to xyz.zip
It's says syntax error I am using Solaris 11.3 Sparc


# mv abc.file(1).zip xyz.zip

bash: syntax error near unexpected token '('



Solution:


The entire file name does not need quoting () do.


# mv 'abc.file(1).zip'  xyz.zip


No comments:

Post a Comment