Created
May 3, 2018 08:18
-
-
Save samqi/fbb50f2463752c42f462e33d33c5b568 to your computer and use it in GitHub Desktop.
curL-ly magic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#check curl connection speed: https://coderwall.com/p/lwpszg/measuring-download-speed-from-the-command-line-with-curl | |
curl -Lo /dev/null -skw "\ntime_connect: %{time_connect}s\ntime_namelookup: %{time_namelookup}s\ntime_pretransfer: %{time_pretransfer}\ntime_starttransfer: %{time_starttransfer}s\ntime_redirect: %{time_redirect}s\ntime_total: %{time_total}s\n\n" http://foolproofcode.com | |
#example result: | |
#time_connect: 0.074s | |
#time_namelookup: 0.063s | |
#time_pretransfer: 0.103 | |
#time_starttransfer: 0.278s | |
#time_redirect: 0.067s | |
#time_total: 0.346s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
check HTTP code from https://gist.github.com/drobune/e03d64ef7ba02864781a and https://superuser.com/questions/272265/getting-curl-to-output-http-status-code
curl -o /dev/null -w '%{http_code}\n' -s -LI http://www.google.com/