Linux curl命令参数常用

本文详细介绍了cURL命令的用途、支持的协议、使用方法,并提供了实例演示,包括网页抓取、代理使用、cookies处理、数据发送、HTTP header处理及认证等核心功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

cURL
1 用途

  cURL是一个命令行方式下传输数据的开源传输工具。常被用来抓取网页和监控Web服务器状态。

2 支持协议

  DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET 和 TFTP。

3 描述

  The command is designed to work without user interaction.

  The URL syntax is protocol-dependent. You'll find a detailed description in RFC 3986.

  curl  normally  displays a progress meter during operations, indicating the amount of transferred data, transfer speeds and estimated time left, etc.

      curl displays this data to the terminal by default, so if you invoke curl to do an operation and it is about  to  write data to the terminal, it disables the progress meter as otherwise it would mess up the output mixing progress meter and response data.

4 用法

1. linux curl抓取网页:

抓取百度:

如发现乱码,可以使用iconv转码:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值