用curl上传我本地目录中的所有文件 [英] Uploading all of files in my local directory with curl
本文介绍了用curl上传我本地目录中的所有文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在一个目录中上传所有文件,并且知道如何使用curl上传一个文件:
curl -Tlocal / xxx.suffix-u xxx:pswftp://192.168.1.158/public/demon_test/xxx.suffix
如何将当前目录中的所有文件(子目录)上载到FTP服务器? / div>
使用 curl
和 find
递归地上传特定目录中的所有文件:
find mydir -type f -exec curl -u xxx:psw --ftp-create-dirs -T {} ftp://192.168。 1.158 / public / demon_test / {} \;
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?
解决方案
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屋!
查看全文