5

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=115.242.140.33&mv=m&ms=au&fexp=906370%2C913574%2C913811%2C932000%2C932004%2C906383%2C916911%2C916910%2C902000%2C901208%2C919512%2C929903%2C925714%2C929119%2C931202%2C900821%2C900823%2C909419%2C911416%2C908529%2C930807%2C919373%2C930803%2C906836%2C920201%2C929602%2C930101%2C930609%2C926403%2C900824%2C912711&ratebypass=yes&mt=1366553656&sver=3&itag=22&id=0123bfcf2a5d9ec4&newshard=yes&expire=1366577026&upn=ByXHIHSd5Uc&key=yt1&cp=U0hVS1VSVV9HUENONV9NTFlBOkRWZzI0MEJKeDBt&signature=BD13D36DD291572B599B536476EC1247E7C487C9.34F8B3C3F0BF8198C68C4490EC4257650A569DC6

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?

1 Answer 1

1

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.

6
  • 1
    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)|115.254.121.208|:80... connected. HTTP request sent, awaiting response... 403 Forbidden 2013-04-23 09:09:28 ERROR 403: Forbidden.
    – 001neeraj
    Apr 23, 2013 at 5:14
  • @001neeraj, and when you don't omit the argument?
    – psusi
    Apr 23, 2013 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, 2013 at 17:12
  • @001neeraj, did you not read the first part of my answer?
    – psusi
    Apr 24, 2013 at 20:01
  • 1
    @001neeraj, you are ignoring the first words in my answer. "You need to put quotes around..."
    – psusi
    Apr 26, 2013 at 14:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .