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 https://stackoverflow.com/questions/821837/how-to-get-the-command-line-args-passed-to-a-running-process-on-unix-linux-syste)

Now, ls.txt contains:

wget --trust-server-names -c -O PSY_GENTLEMAN_M_V_hd720.mp4 --directory-prefix=/home/aliyans/Downloads --referer=https://www.youtube.com/watch?v=ASO_zypdnsQ --user-agent=Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:19.0) Gecko/20100101 Firefox/19.0 http://r5---sn-gxap5ojx-h55e.c.youtube.com/videoplayback?ipbits=8&sparams=cp%2Cgcr%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cupn%2Cexpire&gcr=in&source=youtube&ip=

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?


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.

  • I did as you suggested(Completely omitted that argument). But some other issue showed up: Connecting to r5---sn-gxap5ojx-h55e.c.youtube.com (r5---sn-gxap5ojx-h55e.c.youtube.com)||: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
  • 1
    @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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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