LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-15-2004, 08:40 PM   #1
Longinus
Member
 
Registered: Sep 2003
Distribution: Redhat 9.0 && Slackware 9.1
Posts: 420

Rep: Reputation: 30
wget help


i need some help with wget

i need to get all .jpg files and all .html files from a directory

how would i do this?

thanks
 
Old 06-15-2004, 10:31 PM   #2
penguin4
Senior Member
 
Registered: May 2004
Location: california
Distribution: mdklinux8.1
Posts: 1,209

Rep: Reputation: 45
newbies all; as a newbie have taken time and effort to be informed. how you ask? good ?, start with manuals, mdk has good ones,usr,s;reference
and the cd,s plethora of information till your eyeball bulge! but thats where
i get my info to pass on to any body. thats the learning curve that needs to
be shared with everybody! oh, you downloaded ur linux well help the org;
by buying the manuals it will help you and the organziation. last word, We
are better than windows yes! of course! LINUX RULES!
 
Old 06-15-2004, 10:44 PM   #3
Longinus
Member
 
Registered: Sep 2003
Distribution: Redhat 9.0 && Slackware 9.1
Posts: 420

Original Poster
Rep: Reputation: 30
lol
 
Old 06-15-2004, 11:23 PM   #4
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
I looked at the man pages for wget, and unfortunately, file-globbing is only supported for ftp transfers, and not http. I'm sure you knew that already though.

You may be forced to mirror the site, and then delete the non-html and non-jpeg files after the fact by using a script. I dunno... maybe it's possible to use wget to collect a list of the files on the server, then use grep to weed out those you don't want, and then wget the remaining through repeated wget calls (all through a script of course). It would be easy to do with the exception of getting the file list. Maybe wget has a way to do that... I might look at it again in a few minutes.
 
Old 06-16-2004, 12:09 AM   #5
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
I think your only option would be to use the -A (--accept) option. I haven't tried it myself, but something like this might work:

wget http://some.website.com/wherever -r --level=1 --accept html,jpg

You might have to modify the --level option, but like I said, I haven't tried it. From what the man pages say, it looks like it should.

Last edited by Dark_Helmet; 06-16-2004 at 12:11 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't wget!! aru_04 Linux - General 5 08-13-2005 06:07 AM
wget noir911 Linux - Newbie 8 07-30-2005 09:57 AM
wget Harp00 Linux - Newbie 4 11-15-2004 08:27 PM
wget toastermaker Linux - Software 4 11-13-2004 11:59 AM
wget filex Linux - Security 4 09-08-2004 09:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration