比 man 更强悍的命令行工具 cheat

本文介绍了几个增强命令行使用体验的工具,包括man、tldr和cheat。tldr提供简洁的命令示例,适用于快速查阅;cheat则提供更详细的命令帮助,两者皆可提升命令行操作效率。此外,还提到了cht.sh作为在线查看命令帮助的选项,以及在Windows下的优秀命令行工具cmder和Microsoft Terminal。

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

经常使用命令行,比如 curl 测试接口响应时间

for i in {
   
   1..10};do curl -o /dev/null -s   -w "$i | time_namelookup: %{time_namelookup} | time_connect: %{time_connect} | time_starttransfer: %{time_starttransfer} | time_total: %{time_total}\n" "http://httpbin.org/ip";done

1 | time_namelookup: 0.016000 | time_connect: 0.016000 | time_starttransfer: 0.125000 | time_total: 0.141000
2 | time_namelookup: 0.016000 | time_connect: 0.016000 | time_starttransfer: 0.094000 | time_total: 0.109000
3 | time_namelookup: 0.016000 | time_connect: 0.031000 | time_starttransfer: 0.109000 | time_total: 0.109000
4 | time_namelookup: 0.015000 | time_connect: 0.031000 | time_starttransfer: 0.109000 | time_total: 0.109000
5 | time_namelookup: 0.031000 | time_connect: 0.031000 | time_starttransfer: 0.109000 | time_total: 0.109000
6 | time_namelookup: 0.016000 | time_connect: 0.016000 | time_starttransfer: 0.094000 | time_total: 0.109000
7 | time_namelookup: 0.016000 | time_connect: 0.016000 | time_starttransfer: 0.125000 | time_total: 0.125000
8 | time_namelookup: 0.000001 | time_connect: 0.016000 | time_starttransfer: 0.141000 | time_total: 0.141000
9 | time_namelookup: 0.015000 | time_connect: 0.015000 | time_starttransfer: 0.093000 | time_total: 0.109000
10 | time_namelookup: 0.000001 | time_connect: 0.015000 | time_starttransfer: 0.109000 | time_total: 0.125000

奈何命令行参数太多,记不住怎么办?这时候你需要个男人,它就是 man

man

#man curl 
curl(1)                                      Curl Manual                                     curl(1)

NAME
       curl - transfer a URL

SYNOPSIS
       curl [options] [URL...]

DESCRIPTION
       curl  is  a  tool  to transfer data from or to a server, using one of the supported protocols
       (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP,  LDAPS,  POP3,  POP3S,  RTMP,
       RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP).  The command is designed to work without user
       interaction.

       curl offers a busload of useful tricks like proxy support, user authentication,  FTP  upload,
       HTTP  post,  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值