I am trying to use wget and http to download all contents from folderAA below to directory /root/sstest

wget -r --directory-prefix="/root/sstest"  -o /root/sstest2.log http://site.com/folder1/folder2/folderAA/

When I submit the above command nothing is downloaded.

If I submit a wget request for a specific file from folderAA the file is actually downloaded to /root/sstest:

wget -r --directory-prefix="/root/sstest"  -o /root/sstest2.log http://site.com/folder1/folder2/folderAA/file.txt

Can someone tell me why I cannot download all file content from folderAA at once using the first wget request?


I think it can only work if the website supports directory listing. But, allowing that is considered a security hole and therefore most of the websites don't allow it and this it why you fail to do what you want

| improve this answer | |

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.