2020-02-11 04:08:33 +01:00
|
|
|
#
|
|
|
|
# # ex - archive extractor
|
|
|
|
# # usage: ex <file>
|
|
|
|
ex ()
|
|
|
|
{
|
|
|
|
if [ -f $1 ] ; then
|
|
|
|
case $1 in
|
|
|
|
*.tar.bz2) tar xjf $1 ;;
|
|
|
|
*.tar.gz) tar xzf $1 ;;
|
2020-06-11 20:22:11 +02:00
|
|
|
*.tar.xz) tar xJf $1 ;;
|
2020-02-11 04:08:33 +01:00
|
|
|
*.bz2) bunzip2 $1 ;;
|
|
|
|
*.rar) unrar x $1 ;;
|
|
|
|
*.gz) gunzip $1 ;;
|
|
|
|
*.tar) tar xf $1 ;;
|
|
|
|
*.tbz2) tar xjf $1 ;;
|
|
|
|
*.tgz) tar xzf $1 ;;
|
|
|
|
*.zip) unzip $1 ;;
|
|
|
|
*.Z) uncompress $1;;
|
|
|
|
*.7z) 7z x $1 ;;
|
|
|
|
*) echo "'$1' cannot be extracted via ex()" ;;
|
|
|
|
esac
|
|
|
|
else
|
|
|
|
echo "'$1' is not a valid file"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2020-06-05 00:18:14 +02:00
|
|
|
export EDITOR=vim
|
2020-02-11 04:08:33 +01:00
|
|
|
|
|
|
|
alias pacman-update='sudo pacman-mirrors --geoip'
|
|
|
|
|
2020-07-09 05:48:39 +02:00
|
|
|
alias ls='ls'
|
2020-02-11 04:08:33 +01:00
|
|
|
alias ll='ls -l'
|
|
|
|
# ls, the common ones I use a lot shortened for rapid fire usage
|
2020-07-09 05:48:39 +02:00
|
|
|
alias l='ls -lFh' #size,show type,human readable
|
|
|
|
alias la='ls -lAFh' #long list,show almost all,show type,human readable
|
|
|
|
alias lr='ls -tRFh' #sorted by date,recursive,show type,human readable
|
|
|
|
alias lt='ls -ltFh' #long list,sorted by date,show type,human readable
|
|
|
|
alias ll='ls -l' #long list
|
|
|
|
alias ldot='ls -ld .*'
|
|
|
|
alias lS='ls -1FSsh'
|
|
|
|
alias lart='ls -1Fcart'
|
|
|
|
alias lrt='ls -1Fcrt'
|
2020-02-11 04:08:33 +01:00
|
|
|
|
|
|
|
alias zshrc='${=EDITOR} ~/.zshrc' # Quick access to the ~/.zshrc file
|
|
|
|
|
|
|
|
alias grep='grep --color'
|
|
|
|
alias sgrep='grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS} '
|
|
|
|
|
|
|
|
alias t='tail -f'
|
|
|
|
|
|
|
|
# Command line head / tail shortcuts
|
|
|
|
alias -g H='| head'
|
|
|
|
alias -g T='| tail'
|
|
|
|
alias -g G='| grep'
|
|
|
|
alias -g L="| less"
|
|
|
|
alias -g M="| most"
|
|
|
|
alias -g LL="2>&1 | less"
|
|
|
|
alias -g CA="2>&1 | cat -A"
|
|
|
|
alias -g NE="2> /dev/null"
|
|
|
|
alias -g NUL="> /dev/null 2>&1"
|
|
|
|
alias -g P="2>&1| pygmentize -l pytb"
|
|
|
|
|
|
|
|
alias dud='du -d 1 -h'
|
|
|
|
alias duf='du -sh *'
|
|
|
|
alias fd='find . -type d -name'
|
|
|
|
alias ff='find . -type f -name'
|
|
|
|
|
|
|
|
alias h='history'
|
|
|
|
alias hgrep="fc -El 0 | grep"
|
|
|
|
alias help='man'
|
|
|
|
alias p='ps -f'
|
|
|
|
alias sortnr='sort -n -r'
|
|
|
|
alias unexport='unset'
|
|
|
|
|
|
|
|
alias rm='rm -i'
|
|
|
|
alias cp='cp -i'
|
|
|
|
alias mv='mv -i'
|
2020-05-30 19:57:07 +02:00
|
|
|
alias vim='vim'
|
|
|
|
alias vi='vim'
|
2020-05-29 21:00:16 +02:00
|
|
|
alias gds-start='sudo systemctl start openvpn-client@gds'
|
|
|
|
alias gds-stop='sudo systemctl stop openvpn-client@gds'
|
2020-07-08 20:56:39 +02:00
|
|
|
gitpush() {
|
|
|
|
git add .
|
|
|
|
git commit -m "$*"
|
2020-08-19 19:34:12 +02:00
|
|
|
git pull
|
2020-07-08 20:56:39 +02:00
|
|
|
git push
|
|
|
|
}
|
2020-09-08 19:00:53 +02:00
|
|
|
gitupdate() {
|
|
|
|
eval "$(ssh-agent -s)"
|
|
|
|
ssh-add ~/.ssh/github
|
|
|
|
ssh -T git@github.com
|
|
|
|
}
|
2020-07-08 20:56:39 +02:00
|
|
|
alias gp=gitpush
|
2020-09-08 19:00:53 +02:00
|
|
|
alias gu=gitupdate
|
2020-07-21 23:05:09 +02:00
|
|
|
alias lbrynet='/opt/LBRY/resources/static/daemon/lbrynet'
|
2020-09-17 02:54:02 +02:00
|
|
|
alias update-grub='sudo grub-mkconfig -o /boot/grub/grub.cfg'
|