Browse Source

add bak

master
VirtuBox 1 year ago
parent
commit
aef95ade8d
Signed by: virtubox GPG Key ID: 22EB296C97BAD476
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      mybashrc

+ 11
- 0
mybashrc View File

@ -1,6 +1,8 @@
#!/bin/bash
# FUNCTIONS
force_color_prompt=yes
if [ "$(id -u)" != "0" ]; then
IS_SUDOERS=$(groups | grep sudo)
if [ -n "$(command -v sudo)" ] && [ -n "$IS_SUDOERS" ]; then
@ -657,6 +659,14 @@ _ZABBIX_UPDATE() {
rm -f /tmp/zabbix.deb
}
_BACK_FILE() {
if [ ! -f "$1.bak" ]; then
cp -f "$1" "$1.bak"
else
cp -f "$1" "$1_1.bak"
fi
}
# enable color support of ls and also add handy aliases
# some more ls aliases
#alias wp='/usr/bin/wp --allow-root'
@ -734,3 +744,4 @@ alias speedtestnet="_run _SPEEDTEST 'Installing speedtest'"
alias SSETUP=_SETUP_CONTROLLER
alias journalctfail='journalctl -b -p err -S "yesterday"'
alias zabbix-update=_ZABBIX_UPDATE
alias bak=_BACK_FILE

Loading…
Cancel
Save