Q:

Download with the bash or Python while keeping the directory tree/structure

I have a list of files that I need to download such as
www.domain.com/files/archive.zip
www.domain.com/img/icon.ico
www.domain.com/files/backup/archive.zip
www.domain.com/backup/img/icon.ico
www.domain.com/archive.zip

meaning that i got name collision in this list of files so i need to keep the directory structure intact and recreate it while downloading this, i haven't found nothing even similar to this in the Python urllib and I don't know of any linux tool that can be good for this.
Any suggestion ?

A:

You're looking for wget - it will by default recreate the same directory structure on your localhost as on the webserver it's fetching stuff from.

