使用 curl 上传本地目录中的所有文件 [英] Uploading all of files in my local directory with curl

查看:58
本文介绍了使用 curl 上传本地目录中的所有文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将所有文件上传到一个目录中,并且我知道如何使用 curl 上传一个文件,如下所示:

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"

如何将当前目录下的所有文件(子目录)上传到FTP服务器?

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

推荐答案

使用 curlfind 从特定目录递归上传所有文件:

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/{} ;

这篇关于使用 curl 上传本地目录中的所有文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆