-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaliases
20 lines (17 loc) · 1004 Bytes
/
aliases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#Software
alias upterm='source ~/.bashrc'
alias edterm='nano ~/.bashrc'
#Host
alias hosts='cat /etc/hosts'
#Ubuntu cleaning and updates
function clean_kernels() {
dpkg -l linux-{image,headers}-"[0-9]*" | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e '[0-9]' | xargs sudo apt-get -y purge
}
alias clean_unbuntu='sudo deborphan | xargs sudo apt-get -y remove --purge && sudo deborphan --guess-data | xargs sudo apt-get -y remove --purge'
alias update_ubuntu='sudo apt update && sudo apt --with-new-pkgs upgrade -y && sudo apt autoclean -y && sudo apt autoremove --purge -y && sudo apt clean -y && sudo apt autopurge -y'
alias cleartrash='sudo rm -rf ~/.local/share/Trash/*/*'
alias swap="sudo swapoff -a && sudo swapon -a"
alias clear_cache='sudo rm -rf ~/.cache/thumbnails/*'
alias scan-prelink='sudo /etc/cron.daily/prelink'
alias trim='sudo fstrim /'
alias update='update_ubuntu && clean_unbuntu && clean_kernels && scan-prelink && cleartrash && clear_cache && swap'