You are not logged in.

#1 2019-09-21 10:49:17

untitled0_3cs
Member
Registered: 2019-09-21
Posts: 3

How to exclude certain folders from being downloaded using wget ?

I want to download all files and folders from this directory https://doc.lagout.org/science/ except the folder with the name ComputerScience. How can i exclude that folder from being downloaded using wget ?

I tried something like this:

wget -r -np -R "index.html*" -e robots = off -X https://doc.lagout.org/science/0_Computer%20Science/ https://doc.lagout.org/science/

but it starts downloading everything.

Offline

#2 2019-09-21 11:06:41

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: How to exclude certain folders from being downloaded using wget ?

Why not use rsync?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2019-09-21 11:25:35

untitled0_3cs
Member
Registered: 2019-09-21
Posts: 3

Re: How to exclude certain folders from being downloaded using wget ?

I'm a beginner to GNU/Linux and what i first heard about downloading files using the terminal was with "wget". I'm somewhat familiar with it haven't heard about rsync but i will read the documentation. Do you mind writing a prototype or which options should i use ?

Offline

#4 2019-09-21 12:08:12

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: How to exclude certain folders from being downloaded using wget ?

You should not give the URL to exclude, but only the path like -X "science/0_Computer Science"

Edit: rsync won't work if you only have access via http.

Last edited by progandy (2019-09-21 12:09:46)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#5 2019-09-21 12:21:07

untitled0_3cs
Member
Registered: 2019-09-21
Posts: 3

Re: How to exclude certain folders from being downloaded using wget ?

Yeah i also tried it like that, but i finally found the answer the problem was that because of it not being connected (two words) i had to write a slash '\' for example: "science/0_Computer\ Science". Took me far too long big_smile .

Offline

#6 2019-09-21 12:24:04

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: How to exclude certain folders from being downloaded using wget ?

http://www.grymoire.com/Unix/Quote.html

Last edited by progandy (2019-09-21 13:00:15)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

Board footer

Powered by FluxBB