问题描述
背景
我一直在网上搜索--ftp-create-dirs
的例子.
I have been searching the Internet trying to find an example of --ftp-create-dirs
.
总的来说,我的目标是使用--ftp-create-dirs"在我上传文件时自动创建必要的文件夹(如果它们不存在).
Overall my goal is to use "--ftp-create-dirs" to automatically create the necessary folders if they are not present when I upload my file.
问题
问题是我不知道正确使用 --ftp-create-dirs
的确切语法,有人可以帮我解决这个问题吗?
The problem is I don't know the exact syntax for properly using --ftp-create-dirs
, can someone help me with this?
我现在的卷发:
curl -k -T 000-0000-0000-000.png -u [username]:[pass] --ftp-create-dirs /test --ftp-ssl ftp:[ftp server]
在上面的示例中,我正在尝试上传 .png 图像并在 ftp 服务器上创建 /test
(如果它不存在).
In the example above, I am trying to upload the .png image and create /test
on the ftp server if it does not exist.
推荐答案
通过 FTP 添加新目录:
To add a new directory via FTP:
curl ftp://username:password@10.10.10.10/homes/back/newdir/ --ftp-create-dirs
这篇关于如何使用 curl --ftp-create-dirs?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!