bash: syntax error near unexpected token
Trying to update firefox and this is what I type and get. What does this mean and how can I fix it please.
[root@genesis firefox] # cp /root/Desktop/firefox-3.6.8(2).tar.bz bash: syntax error near unexpected token '(' |
The command "cp" is the copy command, for that you need a source and destination specified. You only have a source "/root/Desktop/firefox-3.6.8(2).tar.bz". The copy command will not update firefox from a tarball and this version of firefox is very much out of date.
What distribution are you using, perhaps there is a build in package manager or command like yum or apt-get to update a pre-compiled version of the current firefox? |
Would this work then (I know it's a very old version of firefox) and I am trying to use Fedora 18 and stay within the command line?
[root@genesis firefox] # cp /root/Desktop/firefox-3.6.8(2).tar.bz \opt\firefox [root@genesis firefox] # tar firefox-3.6.8(2).tar.bz |
Probably the best method is to use yum to update/install firefox.
Code:
# yum install firefox I also choose to live in the command line as much as possible, it is faster than trying to find known applications from a gui and more rewarding when something doesn't go terribly wrong. |
Quote:
Does that mean that you are running your desktop as root (logged in as root in the graphical login manager) and have downloaded the tar.gz file to your desktop via a browser? I'm asking because it is highly unusual to run GUI applications in whatever form or shape, be it a single program or a desktop environment, as root. From a security standpoint this is not recommended as far as I know. Please correct me somone in case I got this wrong. I do not mean to inconvenience you, it just looks strange, and as a complete newbie I have so far made many silly mistakes....:banghead: Someone could have told me |
Quote:
http://www.cyberciti.biz/faq/tar-extract-linux/ |
The '(' and ')' are illegal characters in any bash command. So any command with using this file name will throw an error. You'd have to escape:
Code:
cp foo\(bar\) baz jlinkels |
All times are GMT -5. The time now is 07:05 PM. |