Last active
April 6, 2020 15:32
-
-
Save bmatthewshea/5aa329cff756628c5a35811b81c62f03 to your computer and use it in GitHub Desktop.
Some BASH aliases. APT upgrade alias/more
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
# SUDO | |
alias sw='sudo -u www-data' | |
alias beroot='sudo su -' | |
# NANO/EDITING | |
alias e='nano -\$wcS' | |
alias se='sudo nano -\$wcS' | |
# FILES-LS | |
alias l='ls -lah' | |
# PS SHOW ALL/TREE FORMAT/WIDE | |
alias ps='/bin/ps auxfwww' | |
# UNCOMPRESSED TAR SIZE | |
alias tarsize="tar tzvf $1| awk '{s+=\$3} END{print (s/1024/1024), MB}'" | |
# SYSTEM-UPDATES | |
alias system_update='printf "\nSYSTEM UPGRADE STARTED\n\n"; \ | |
printf "Current Distribution: %b %b %b\n" $(lsb_release -sd); \ | |
printf "\nRunning update..\n\n"; \ | |
sudo apt update && \ | |
printf "\nRunning autoremove before upgrade..\n\n"; \ | |
sudo apt autoremove && \ | |
printf "\nRunning upgrade..\n\n"; \ | |
sudo apt upgrade && \ | |
printf "\nAPT Upgrade completed. Sleeping 10 seconds..\n\n"; sleep 10 && \ | |
printf "\nRunning update again..\n\n"; \ | |
sudo apt update && \ | |
printf "\nRunning autoremove post-upgrade..\n\n"; \ | |
sudo apt autoremove && | |
printf "\nSystem upgrade completed!\n\n"' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment