Clan x86

Technical (Development, Security, etc.) => Unix / Linux Discussion => Topic started by: Newby on January 13, 2006, 06:00:09 PM

Title: Using wget to grab tgz's in an index
Post by: Newby on January 13, 2006, 06:00:09 PM
ok, I have had no luck at ALL.

I want to grab the packages in this (http://mirror.cc.columbia.edu/pub/software/kde/stable/3.5/contrib/Slackware/10.2) directory. Too bad I can't get wget to grab 'em.

Help please. I've tried almost everything. I want to grab them all in one swift command. :(
Title: Re: Using wget to grab tgz's in an index
Post by: iago on January 13, 2006, 08:38:05 PM
I know it's possible, just set a filename and a directory name match, both of which you can find on wget's manpage.  You also want to use -r for recursive, obviously.  I'd figure it out, since I've done that before, but I don't have time right now. 
Title: Re: Using wget to grab tgz's in an index
Post by: Newby on January 13, 2006, 09:09:32 PM
I played around with practically every argument there was and to no avail.

I'll try again later.
Title: Re: Using wget to grab tgz's in an index
Post by: Joe on January 13, 2006, 10:19:16 PM
wget -r http://mirror.cc.columbia.edu/pub/software/kde/stable/3.5/contrib/Slackware/10.2/

??
Title: Re: Using wget to grab tgz's in an index
Post by: iago on January 13, 2006, 10:36:36 PM
Quote from: Joe[e2] on January 13, 2006, 10:19:16 PM
wget -r http://mirror.cc.columbia.edu/pub/software/kde/stable/3.5/contrib/Slackware/10.2/

??

No, that'll download the entire site, mirror.cc.columbia.edu. 

I have a little time, I'll see if I can figure it out.
Title: Re: Using wget to grab tgz's in an index
Post by: iago on January 13, 2006, 10:43:07 PM
You're right, that's a tricky problem.  I'm sure it wouldn't be hard to just save the filenames and script it in Perl or Bash or something. 

But an easy workaround is this command:

$ ncftpget mirror.cc.columbia.edu /tmp /pub/software/kde/stable/3.5/contrib/Slackware/10.2/*.tgz

I know that's cheating, but eh? :)
Title: Re: Using wget to grab tgz's in an index
Post by: Newby on January 13, 2006, 10:53:26 PM
Awesome. iago for the win.