Skip to content

Instantly share code, notes, and snippets.

@Martins6
Created May 13, 2021 20:33
Show Gist options
  • Save Martins6/c67a56d78968ae9acfcb89222fbc5180 to your computer and use it in GitHub Desktop.
Save Martins6/c67a56d78968ae9acfcb89222fbc5180 to your computer and use it in GitHub Desktop.
To update, upgrade and log all the packages for your Debian-based distribution.
#!/bin/bash
file_path=/home/adriel_martins/.update_upgrade.log
echo "** TURN ** : $(date +%d-%m-%Y)" >> $file_path
apt update >> $file_path
apt upgrade -y >> $file_path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment