Created
May 21, 2019 12:37
-
-
Save ram0973/393b5909613ff0deedb772b06bfa7f88 to your computer and use it in GitHub Desktop.
Oneliner that select best (by download speed) mirror based on mirrors.ubuntu.com for yours ip.
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
curl -s http://mirrors.ubuntu.com/mirrors.txt | xargs -n1 -I {} sh -c 'echo `curl -r 0-102400 -s -w %{speed_download} -o /dev/null {}/ls-lR.gz` {}' |sort -g -r |head -1| awk '{ print $2 }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment