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