Saved & Used .bash_aliases

Editiere:

nano ~/.bash_aliases
# default echo
alias xxx='echo "
WELCOME! ~ You are acting as $USER.
"'

# THIS aliases
alias xxx.bash='nano ~/.bash_aliases'

# basics
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -lh'
alias l='ls $LS_OPTIONS -lA'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# up2date
alias xxx.update='apt update && apt upgrade'
alias xxx.uplist='apt list --upgradable'
alias xxx.upgrade='apt dist-upgrade && apt full-upgrade'
alias xxx.upclean='apt autoremove && apt autoclean && apt clean && apt purge'
alias xxx.upflat='flatpak update'
alias xxx.upsnap='snap refresh'

# network
alias xxx.mtr='mtr 1.1.1.1'

# security
alias xxx.lynis='lynis audit system'

# www
alias chown.www='chown -r www-data:www-data /var/www'
alias chown.xxx='chown -r xxx:www-data /var/www'
alias chmod.www='chmod -r 755 /var/www'
alias apache.restart='systemctl apache2 restart'
alias maria.restart='systemctl mariadb restart'

## a quick way to get out of current directory
alias ..='cd ..'
alias ...='cd ../../../'
alias ....='cd ../../../../'
alias .....='cd ../../../../'
alias .1='cd ../'
alias .2='cd ../../'
alias .3='cd ../../../'
alias .4='cd ../../../../'
alias .5='cd ../../../../../'
alias .6='cd ../../../../../../'

### Date
alias xxx.path='echo -e ${PATH//:/\\n}'
alias xxx.now='date +"%T"'
#alias xxx.nowtime='now'
alias xxx.nowdate='date +"%d-%m-%Y"'

### weather
alias xxx.weather='curl "https://wttr.in/Berlin"'

### exit
alias xxx.X='exit'

### eDEX
alias xxx.tron='cd ~/.config/eDEX-UI'

### ShowMe
alias xxx.showreboot='last reboot -F'
alias xxx.xxx=''

### See used Memory
alias xxx.memory='free -m'

### Clear PageCache
### Do it maybe ONLY ONCE a day e.g. before reboot
### Moreover it will also slow the system for a few seconds while the cache is cleaned
### and every resource required by OS is loaded again in the disk-cache.
alias xxx.clearcache='sync; echo 1 > /proc/sys/vm/drop_caches'

### Clear Swap
alias xxx.clearswap='swapoff -a && swapon -a'

### ReFresh Kernel
alias xxx.upinit='update-initramfs -u'

STRG+O & STRG+X


update ~/.bash_aliases

source ~/.bash_aliases
. ~/.bashrc

Wir benutzen Cookies

Wir nutzen Cookies auf unserer Website. Einige von ihnen sind essenziell für den Betrieb der Seite, während andere uns helfen, diese Website und die Nutzererfahrung zu verbessern (Tracking Cookies). Sie können selbst entscheiden, ob Sie die Cookies zulassen möchten. Bitte beachten Sie, dass bei einer Ablehnung womöglich nicht mehr alle Funktionalitäten der Seite zur Verfügung stehen.