Case: recursively download all the files that are in the ‘ddd’ folder for the url ‘http://hostname/aaa/bbb/ccc/ddd/’
Solution:
wget -r -np -nH –cut-dirs=3 -R index.html http://hostname/aaa/bbb/ccc/ddd/
Explanation:
It will download all files and subfolders in ddd directory:
recursively (-r),
not going to upper directories, like ccc/… (-np),
not saving files to hostname folder (-nH),
but to ddd by omitting first 3 folders aaa, bbb, ccc (–cut-dirs=3),
excluding index.html files (-R index.html)
Thanks, you saved my time…
Great, I owe 10 minutes of my life time to you.
Pls command me what (good things) can I do for you 🙂
“–cut-dirs=3” should be “–cut-dirs=3”
I think you meant –cut-dirs= 3
Thanks, good tip!
Thanks ! I will make an alias for this ! 🙂
fantastic! Neymar does something like your play football for Brazil. 🙂
thanks for this post, it helped me
Thanks very much, this helps a lot.
Better to use -R “index.html*” instead of -R index.html to exclude download of “index.html?blah=blah” kind of files