开发者

Wget Folder in Bash

开发者 https://www.devze.com 2023-03-04 16:44 出处:网络
I\'m trying to use wget in bash to get a folder from my ftp host, but when I download the files it makes new folders for the folder that I\'m downloading. For example, when I use this script to downlo

I'm trying to use wget in bash to get a folder from my ftp host, but when I download the files it makes new folders for the folder that I'm downloading. For example, when I use this script to download my folder:

wget -r开发者_如何学编程 "ftp://$USER:$PASS@example.com/subdomains/cydia/httpdocs/theme/themes/$theme_root"

It creates a folder called "example.com" then within that one it makes "subdomains" and so on. I just want it to download the $theme_root folder that I'm downloading into the folder that I used cd to get into (/theme_builder/themes). Sorry if I'm not explaining this well but thanks in advance!


wget -nH --cut-dirs=4 -r url

I hope, than counted right... if not, change the 4 to another number.

0

精彩评论

暂无评论...
验证码 换一张
取 消