Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use wget with Flashgot in Firefox to download. I can't resume download if i pause(by ctrl+c). Because, i don't know the commandline arguments of wget to manually add it in a terminal. So i did following steps to get those commandline arguments, when wget started downloading. After these procedures, i pressed ctrl+c to pause download:

  1. ps -A | grep -i wget and copied the pid of wget suppose it is 16760
  2. xargs -0 echo < /proc/16760/cmdline > ls.txt (From

Now, ls.txt contains:

wget --trust-server-names -c -O PSY_GENTLEMAN_M_V_hd720.mp4 --directory-prefix=/home/aliyans/Downloads --referer= --user-agent=Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:19.0) Gecko/20100101 Firefox/19.0

I copied the above line and pasted in a terminal. But it showed:

bash: syntax error near unexpected token `('

How can i resume a download from wget which was started by FlashGot? or Is there any other method?

share|improve this question
up vote 0 down vote accepted

You need to put quotes around the --user-agent=Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:19.0) Gecko/20100101 Firefox/19.0 part to prevent the shell from interpreting the parenthesis and semicolon, or just omit that argument entirely as it shouldn't be needed.

share|improve this answer
I did as you suggested(Completely omitted that argument). But some other issue showed up: Connecting to (||:80... connected. HTTP request sent, awaiting response... 403 Forbidden 2013-04-23 09:09:28 ERROR 403: Forbidden. – 001neeraj Apr 23 '13 at 5:14
@001neeraj, and when you don't omit the argument? – psusi Apr 23 '13 at 13:49
When i use the output from xargs -0 echo < /proc/16760/cmdline > ls.txt it shows the above error – 001neeraj Apr 24 '13 at 17:12
@001neeraj, did you not read the first part of my answer? – psusi Apr 24 '13 at 20:01
@001neeraj, you are ignoring the first words in my answer. "You need to put quotes around..." – psusi Apr 26 '13 at 14:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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