帮助与文档

当前位置: 主页 > 系统相关 > 正文

Debian下使用curl操作ftp上传和下载

时间:2024/4/25 8:44:56   来源:米安网络   作者:云主机配置专家   点击:10次
1.文件上传 curl --ftp-create-dirs -T ./main.py ftp://test:testpasswd123123@45.x.x.136/main.py --ftp-create-dirs 代表在ftp上自动创建目标文件夹。 -T 上传文件 ftp目标路径: ftp://test:testpasswd123123@45.x.x.136/ test是ftp用户名 testpasswd123123是ftp密码,需要注意密码中包含特殊字符时需要转码 2.文件下载 查看目录下面的文件 curl ftp://username:password@192.168.10.91:21/ 最后一定要加斜杠“/”,否则报错 下载文件到本地 curl ftp://test:testpasswd123123@45.x.x.136/main.go -o main.go.bak 这里用到的参数是 -o,注意参数位置,不在最前面。

版权保护: 本文「Debian下使用curl操作ftp上传和下载」由 云主机配置专家 原创,转载请保留链接: https://www.miandns.com/docs/system/342.html

联系客服

0312-5535754

微信公众号