Last active
August 28, 2020 18:11
-
-
Save tatticoder/62835b894f9cdcb3c6916a6e6ff1f1a6 to your computer and use it in GitHub Desktop.
Simple script to update Linux packages via terminal
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
starttime=$(date) | |
# give path of a text file and un-comment next line to log starting time times | |
#echo "update Started at $starttime" >>/home/[user]/Desktop/file.txt | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
endtime=$(date) | |
# give path of a text file and un-comment next line to log finish times | |
#echo "update completed successfully on $endtime" >>/home/[user]/Desktop/file.txt | |
shutdown now #shutdown pc | |
# shutdown -r09:35 #reboot the machine at 09:35am |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment