I'm trying to download some directories from an Apache server, but I need to ignore some directories that have huge files I don't care about
The dir structure in the server is somewhat like this (simplified):
somedir/ ├── atxt.txt ├── big_file.pdf ├── image.jpg └── tmp └── tempfile.txt
So, I want to get all the
.jpg files, but I DON'T want the
I've tried using
--exclude-directories together with
--accept and then with
--reject, but in both attempts it keeps downloading the
tmp dir and its contents.
These are the commands I've tried:
# with --reject wget -nH --cut-dirs=2 -r --reject=pdf --exclude-directories=tmp \ --no-parent http://<host>/pub/somedir/ # with --accept wget -nH --cut-dirs=2 -r --accept=txt,jpg --exclude-directories=tmp \ --no-parent http://<host>/pub/somedir/
Is there a way to do this?
How exactly is
--exclude-directories supposed to work?