非交互式地使用 curl

# Without retry and time limit
curl -fsSo /dev/null
# With retry and time limit
curl -fsSo /dev/null -m 10 --retry 5

开关解释:

    -f, --fail      Fail silently (no output at all) on HTTP errors
    -s, --silent    Silent mode
    -S, --show-error     Show error even when -s is used
    -o, --output file  Write to file instead of stdout
    -m, --max-time seconds  Maximum time allowed for the transfer
        --retry num         Retry request if transient problems occur
本页面最后修改于 2021-10-11,距今约 1363

Created By 三三好记性不如烂 Wiki - 人工大脑CC BY-SA or CC BY-NC-SA 4.0