mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 16:41:43 +05:30
alias: Convert 'up' as a function
- 'up' made into a function - Removed old php related aliases
This commit is contained in:
@@ -11,6 +11,13 @@ dir_size(){
|
|||||||
du -ah "$dir" --max-depth=1 | sort -hr
|
du -ah "$dir" --max-depth=1 | sort -hr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
up(){
|
||||||
|
sudo pkcon refresh && sudo pkcon update && sudo apt dist-upgrade && sudo apt autoremove
|
||||||
|
command -v rustup >/dev/null && rustup update
|
||||||
|
command -v brew > /dev/null && brew update && brew upgrade && brew autoremove && brew cleanup
|
||||||
|
command -v npm > /dev/null && npm update -g
|
||||||
|
}
|
||||||
|
|
||||||
# Network
|
# Network
|
||||||
alias flush-dns="sudo systemd-resolve --flush-caches"
|
alias flush-dns="sudo systemd-resolve --flush-caches"
|
||||||
alias dnsreset="sudo systemctl restart dnscrypt-proxy"
|
alias dnsreset="sudo systemctl restart dnscrypt-proxy"
|
||||||
@@ -21,23 +28,17 @@ alias listening_apps="sudo netstat -nutlp | grep ':' | awk '{print \$1,\$4,\$NF}
|
|||||||
|
|
||||||
|
|
||||||
# Update & Upgrades
|
# Update & Upgrades
|
||||||
alias up="sudo pkcon refresh && sudo pkcon update && sudo apt dist-upgrade && sudo apt autoremove && rustup update && brew upgrade && brew autoremove && brew cleanup && npm update -g"
|
|
||||||
alias distup="sudo apt dist-upgrade"
|
alias distup="sudo apt dist-upgrade"
|
||||||
alias autorem="sudo apt autoremove"
|
alias autorem="sudo apt autoremove"
|
||||||
alias update="sudo apt-get update"
|
alias update="sudo apt-get update"
|
||||||
alias install="sudo apt-get install "
|
alias install="sudo apt-get install "
|
||||||
alias remove="sudo apt-get remove "
|
alias remove="sudo apt-get remove "
|
||||||
|
|
||||||
|
|
||||||
# For servers
|
# For servers
|
||||||
alias ngt="sudo nginx -t"
|
alias ngt="sudo nginx -t"
|
||||||
alias ngrestart="sudo systemctl restart nginx"
|
alias ngrestart="sudo systemctl restart nginx"
|
||||||
alias ngreload="sudo systemctl reload nginx"
|
alias ngreload="sudo systemctl reload nginx"
|
||||||
alias ngstop="sudo systemctl stop nginx"
|
alias ngstop="sudo systemctl stop nginx"
|
||||||
alias fpmreset71="sudo systemctl restart php7.1-fpm"
|
|
||||||
alias fpmreset72="sudo systemctl restart php7.2-fpm"
|
|
||||||
alias fpmreset73="sudo systemctl restart php7.3-fpm"
|
|
||||||
alias fpmreset74="sudo systemctl restart php7.4-fpm"
|
|
||||||
|
|
||||||
f2b_banned_ips() {
|
f2b_banned_ips() {
|
||||||
provided_jail=$1
|
provided_jail=$1
|
||||||
|
|||||||
Reference in New Issue
Block a user