You have to pass the -np
/--no-parent
option to wget
(in addition to -r
/--recursive
, of course), otherwise it will follow the link in the directory index on my site to the parent directory. So the command would look like this:
wget --recursive --no-parent http://example.com/configs/.vim/
To avoid downloading the auto-generated index.html
files, use the -R
/--reject
option:
wget -r -np -R "index.html*" http://example.com/configs/.vim/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…