2

I have read the manual page for wget and search Google for an answer, but haven't been able to get it.

How would I use wget to download only folders that contain a specific term in their names from an FTP site that also has multiple other directories without that term in their names?

1
wget -I /people,/cgi-bin http://host/people/bozo/

-I is followed by a comma separated list of the directories you want to include.

However, note that this will just include the full name listed in -I, I believe, not part of the name, it sounds like you may want to be including directories based on a partial pattern. If anyone knows how to do regex type excludes/includes with wget, I'd like to learn that, I've looked for that for years.

https://www.gnu.org/software/wget/manual/html_node/Directory_002dBased-Limits.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.