[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
wildcard and "--exclude-directories"
From: |
Jan Nagel |
Subject: |
wildcard and "--exclude-directories" |
Date: |
Tue, 19 Oct 2021 22:03:39 +0200 |
Hello,
I'm trying to mirror a website "https://server.domain.com/" using GNU wget 1.21
(on Debian 12, "testing").
I want to exclude the directory "https://server.domain.com/foo" and all
subdirectories of "https://server.domain.com/bar", but I want all files in
"https://server.domain.com/bar/" to be included.
So I run:
wget --recursive -X "/foo,/bar/*" https://server.domain.com/
This doesn't do what I expect it to do:
The directory "https://server.domain.com/foo" is excluded ... as expected.
Files in directory "https://server.domain.com/bar/" are included ... as
expected.
But subdirectories of "https://server.domain.com/bar/" are included, too.
The man page says:
"-X list
--exclude-directories=list
Specify a comma-separated list of directories you wish to exclude from
download. Elements of list may contain wildcards."
How can I prevent wget from downloading subdirectories of
"https://server.domain.com/bar/"?
Am I using the wildcard "*" in the wrong way?
Thanks for your help!
Jan Nagel
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- wildcard and "--exclude-directories",
Jan Nagel <=