V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
zxCoder
V2EX  ›  问与答

关于 Linux curl 命令参数

  •  
  •   zxCoder · 2020-12-01 08:45:20 +08:00 · 833 次点击
    这是一个创建于 1214 天前的主题,其中的信息可能已经有所发展或是发生改变。
    Usage: curl [options...] <url>
         --abstract-unix-socket <path> Connect via abstract Unix domain socket
         --alt-svc <file name> Enable alt-svc with this cache file
         --anyauth       Pick any authentication method
     -a, --append        Append to target file when uploading
         --basic         Use HTTP Basic Authentication
         --cacert <file> CA certificate to verify peer against
         --capath <dir>  CA directory to verify peer against
     -E, --cert <certificate[:password]> Client certificate file and password
         --cert-status   Verify the status of the server certificate
         --cert-type <type> Certificate file type (DER/PEM/ENG)
         --ciphers <list of ciphers> SSL ciphers to use
         --compressed    Request compressed response
         --compressed-ssh Enable SSH compression
     -K, --config <file> Read config from a file
         --connect-timeout <seconds> Maximum time allowed for connection
         --connect-to <HOST1:PORT1:HOST2:PORT2> Connect to host
     -C, --continue-at <offset> Resumed transfer offset
    

    比如-a 后面有很多个--axxxxx 是表示如果只写-a 就默认是后面刚好正对的那个--append

    3 条回复    2020-12-01 12:54:26 +08:00
    IgniteWhite
        1
    IgniteWhite  
       2020-12-01 08:59:32 +08:00 via iPhone
    是的,只有同一行里对应的可以用-a 简写。

    建议系统了解一下 man 命令,它默认的 pager 是 less,如何使用 less 快速跳转和搜索。其他很多系统命令,比如 systemctl 和 journalctl,用的 pager 也是 less,所以学会使用和配置 less 就可以一劳永逸啦
    zxCoder
        2
    zxCoder  
    OP
       2020-12-01 09:16:28 +08:00
    @IgniteWhite 多谢 学到了
    julyclyde
        3
    julyclyde  
       2020-12-01 12:54:26 +08:00
    什么叫“很多个--axxxxx”?
    -a 只对应--append 这一个
    和后边--basic 没有任何关系
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2770 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 12:31 · PVG 20:31 · LAX 05:31 · JFK 08:31
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.