cur下載地址
curl FTP 上傳下載文件
1.查看文件
curl ftp://192.168.2.10/test/ -u user:passwd 查看test文件夾下的文件(文件夾后必須加 /),查看更目錄直接寫ftp://192.168.2.10/
curl ftp://192.168.2.10/test/test.txt -u user:passwd 在dos界面查看test.txt文件內容
curl ftp://user:passwd@192.168.2.10/test/ 查看test文件夾下內容的簡潔寫法
2.上傳文件
上傳test.txt文件並以test.txt保存在ftp上
curl ftp://user:passwd@192.168.2.10/test/ -u user:passwd -T "test.txt"
上傳test.txt文件並以test_new.txt保存在ftp上
curl ftp://user:passwd@192.168.2.10/test/test_new.txt -u user:passwd -T "test.txt"
上傳多個文件
curl ftp://user:passwd@192.168.2.10/test/ -u user:passwd -T "{test1.txt,test2.txt}"
3.下載文件
下載 FTP 指定文件 /test/test.txt, 以原文件名命名保存到當前目錄
curl ftp://user:passwd@192.168.2.10/test/test.txt -u user:passwd -O
下載 FTP 指定文件 /test/test.txt, 以 test_new.txt 命名保存
curl ftp://192.168.2.10/test/test.txt -u user:passwd -o test_new.txt
上傳中文名稱文件有問題,還沒有找到解決的辦法
參考 https://curl.haxx.se/docs/manual.html
https://blog.csdn.net/wulong710/article/details/53127606