zxCoder
V2EX  ›  问与答

关于 Linux curl 命令参数

  •  
  •   zxCoder · Dec 1, 2020 · 1214 views
    This topic created in 1990 days ago, the information mentioned may be changed or developed.
    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 replies    2020-12-01 12:54:26 +08:00
    FurN1
        1
    FurN1  
       Dec 1, 2020 via iPhone
    是的,只有同一行里对应的可以用-a 简写。

    建议系统了解一下 man 命令,它默认的 pager 是 less,如何使用 less 快速跳转和搜索。其他很多系统命令,比如 systemctl 和 journalctl,用的 pager 也是 less,所以学会使用和配置 less 就可以一劳永逸啦
    zxCoder
        2
    zxCoder  
    OP
       Dec 1, 2020
    @IgniteWhite 多谢 学到了
    julyclyde
        3
    julyclyde  
       Dec 1, 2020
    什么叫“很多个--axxxxx”?
    -a 只对应--append 这一个
    和后边--basic 没有任何关系
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3745 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 00:43 · PVG 08:43 · LAX 17:43 · JFK 20:43
    ♥ Do have faith in what you're doing.