Created
December 21, 2020 07:03
-
-
Save tienthanh2509/31df63b9c962df649f382e820a7b9cdf to your computer and use it in GitHub Desktop.
Set time from internet without NTP server
This file contains hidden or 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
#!/bin/ | |
# | |
date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z" | |
hwclock -w |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment