xyzzyrz
xyzzyrz

Reputation: 16406

Recursive wget with URL filter/under certain (non-parent) directory?

Is it possible to start at http://host/foo/bar/baz/index.cgi?page=1 and recursively fetch any content under http://host/foo/? (Can't start at http://host/foo/ since that's not a valid page.) I looked at the various options to control what wget recursive fetches, such as --no-parent and --include-directories, but I can't seem to find an option to accomplish the above, e.g. a simple URL substring filter.

Upvotes: 3

Views: 3360

Answers (1)

xyzzyrz
xyzzyrz

Reputation: 16406

Turns out --include-directories does do what I want - I just wasn't using it right. I should've done:

wget --include-directories /foo 'http://host/foo/bar/baz/index.cgi?page=1'

Upvotes: 6

Related Questions