Uploading all of files in my local directory with

2019-01-16 20:27发布

I want to upload all the files in one directory, and I know how to upload one file using curl like this :

curl -T "local/xxx.suffix" -u xxx:psw "ftp://192.168.1.158/public/demon_test/xxx.suffix"

How can I upload all the files (subdirectory) in the current directory to an FTP server?

2条回答
看我几分像从前
2楼-- · 2019-01-16 20:54

Use curl with find to recursively upload all files from a specific directory:

find mydir -type f -exec curl -u xxx:psw --ftp-create-dirs -T {} ftp://192.168.1.158/public/demon_test/{} \;
查看更多
Juvenile、少年°
3楼-- · 2019-01-16 20:57

instead of curl, use wput (not to be confused with wget).

查看更多
登录 后发表回答