简体   繁体   English

Bash中的Wget文件夹

[英]Wget Folder in Bash

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. 我正在尝试在bash中使用wget从ftp主机中获取文件夹,但是当我下载文件时,它将为要下载的文件夹创建新文件夹。 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. 它创建一个名为“ example.com”的文件夹,然后在其中创建“子域”,依此类推。 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). 我只希望它将要下载的$theme_root文件夹下载到使用cd进入(/ theme_builder / themes)的文件夹中。 Sorry if I'm not explaining this well but thanks in advance! 对不起,如果我不能很好地解释这一点,但是请提前感谢!

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

我希望比算的还正确...如果没有,请将4更改为另一个数字。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM