Note that HTTP doesn't have a real way to detect whether something is a "directory" or not, so Wget doesn't have a real way to know what's the parent, except by you explicitly putting slashes at the end. From your script example:
wget -c --no-proxy -r -np http://maps.civicactions.net/maps/geodata/tiger2004fe_polygons/ In this case, "parent" should be /maps/geodata/tiger2004fe_polygons, because it ends with a slash. If it's downloading files higher in the hierarchy than that, please attach a debug log demonstrating this. wget -c --no-proxy -r -np http://maps.civicactions.net/maps/geodata/tiger2004fe_polygons2 In this case, "parent" should be /maps/geodata. Wget has no reliable way of determining whether tiger2004fe_polygons2 should be considered a "directory" or not. There _is_ a heuristic that has been suggested for Wget to make more- educated guess as to whether it should consider something a directory, which would probably be fairly effective: https://savannah.gnu.org/bugs/index.php?20519 For now, though, your best bet is to ensure that you terminate your URLs with slashes when it's appropriate to do so. I'm setting the status to invalid, on the assumption that this resolves your issue. If you're still seeing problems with this, even when you're using slashes appropriately, please set the status back to New, give relevant snippets from a log file (with --debug set), and describe the differences between what they demonstrate and what you expect. Ubuntu (and Debian) have not made very significant changes to Wget over upstream's version, so actual issues you encounter will tend to be in upstream as well as in Ubuntu or Debian. However, I'm the maintainer for the upstream project, and monitor launchpad and the Debian bug lists for Wget pretty actively, so reporting problems here is fine (though, if it's a new bug we haven't started tracking in Savannah yet, it's easier for me if you report it there). ** Changed in: wget (Ubuntu) Status: New => Invalid -- wget does not respect -np flag https://bugs.launchpad.net/bugs/201854 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs