LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   wget - retrieving one folder of website (https://www.linuxquestions.org/questions/linux-software-2/wget-retrieving-one-folder-of-website-298912/)

davidhayter 03-07-2005 07:52 PM

wget - retrieving one folder of website
 
Im currently trying hard to do the following:
I need to copy the contents of a websites folder, eg http://website/folder1
The problem Im getting is that wget tries to get all of the files of the server http://website, and also, if there any href to an external site like amazon.com, then wget tries to retrieve amazon as well, what params should I run wget with to stop this behaviour, I mean, Id just like to do something like the imaginary "cp -fr http://website/folder1 . " and just that, no parents retrieved, no external links
So far, all Ive found is
wget -t0 -m http://website/folder
but doesnt work for my purposes
Thanks a lot

Linux.tar.gz 03-07-2005 08:03 PM

wget http://adress/folder/*.* should work well

davidhayter 03-07-2005 08:06 PM

Wildcards not allowed in http...

homey 03-07-2005 08:17 PM

Quote:

no parents retrieved, no external links
I never ran into the external links problem but I'm using ftp sites which may be a fix ???
Anyway, I use cut dirs to not download the full path and Exclude to not download some directories.
For example....
Code:

If you want to exclude one or more directories from the download, you can use the –X option.
wget -cmq -nH --passive \
-X /pub/linux/suse/suse/i386/8.2/suse/src \
ftp://chuck.ucs.indiana.edu/pub/linu.../suse/i386/8.2

Note: the --cut-dirs option. That's used with -nH to avoid the recreation of the ftp site directory hierarchy
 wget -cm -nH --passive --cut-dirs=7 \
 -X /sites/ftp.redhat.com/pub/redhat/linux/updates/7.3/en/os/i386/SRPMS \
ftp://ftp.mirror.ac.uk/sites/ftp.red...7.3/en/os/i386

wget -cm -nH --passive --cut-dirs=9 \
ftp://mirror.dulug.duke.edu \
/ftp.redhat.com/pub/redhat/linux/enterprise/3/en/os/i386/SRPMS


davidhayter 03-07-2005 08:20 PM

thx a lot


All times are GMT -5. The time now is 12:47 PM.