人工大脑

好记性不如烂 Wiki

用户工具

站点工具


curl-non-interactive

非交互式地使用 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

curl-non-interactive.txt · 最后更改: 2021-10-11 04:05:25 由 三三