linux 鼠标精灵,按键精灵curl 文件 和 使用方法

--GET方式提交数据

curl -G -d "name=value&name2=value2" http://www.baidu.com

--POST方式提交数据

curl -d "name=value&name2=value2" http://www.baidu.com #post数据

--以表单的方式上传文件

curl -F file=@/tmp/me.txt http://www.aiezu.com

curl -F key=123 -F data=123 -F file=@/sdcard/1.png http://yesp.top

--设置header

curl -A "Mozilla/5.0 Firefox/21.0" http://www.baidu.com #设置http请求头User-Agent

curl -e "http://pachong.org/" http://www.baidu.com #设置http请求头Referer

curl -H "Connection:keep-alive \nUser-Agent: Mozilla/5.0" http://yesp.top

--http响应头处理

curl -I http://www.aiezu.com #仅仅返回header

curl -D /tmp/header http://www.aiezu.com #将http header保存到/tmp/header文件

--curl认证

curl -u aiezu:password http://www.aiezu.com #用户名密码认证

curl -E mycert.pem https://www.baidu.com #采用证书认证

--curl_ftp 几种写法

curl ftp://ip:端口/路径/ --user name:passwd

curl ftp://ip:端口/路径/ name:passwd    #简洁写法

curl ftp://name:passwd@ip:端口/路径/    #简洁写法2

--FTP上传

curl --user user:pass -T /file/name ftp://ip:端口/路径/

--FTP下载

curl ftp://ip:端口/路径/ –u name:passwd -o size.zip

curl ftp://ip:端口/路径/ –u name:passwd -o /保存路径

--FTP删除

curl -u name:passwd ftp://ip:端口/ -X 'DELE 路径'

--列出ftp服务器上的目录列表

curl ip:端口/路径/ –u name:passwd

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值