Close
Skip to content

Bash Aliases

Contents of my ~/.bash_aliases file. Also available at paste.travisrunyard.us/?263176ba767ff0db#T79PQWs7Fht13AN3Za8AcMqQ9RxazwavF5veRZvMgCY.

alias s='sudo'
alias dush='du -Sh 2>/dev/null | sort -rh | head -15'
#alias vnstat='vnstat -i enp4s0'
alias vi='vim'
alias wap='iw dev wlp0s20f3 station dump -u -v'
alias wap2='iw wlp0s20f3 info'
alias rsyncgood='rsync -vuzith --progress --checksum --recursive --delete --compress --copy-links --stats --log-file="$HOME/rsyncgood.log"'
alias rsynctight='rsync --verbose --recursive --compress --delete --itemize-changes --times --human-readable --progress --checksum --copy-links --stats --log-file="HOME/rsynctight.log"'
alias rsyncloose='rsync --recursive --update --itemize-changes --delete --progress --human-readable --stats --verbose --log-file="$HOME/rsyncloose.log"'
alias rsyncloosest='rsync --recursive --size-only --noatime --update --itemize-changes --delete --progress --human-readable --stats --verbose --log-file="$HOME/rsyncloosest.log"'
alias rsyncignore='rsync --ignore-existing --recursive --update --delete --itemize-changes --progress --human-readable --stats --verbose --log-file="$HOME/rsyncignore.log"'
alias rsyncscripts='rsyncloose /home/username/Documents/scripts/linux/ /media/username/p0ds0smb/username/Documents/Scripts/linux/'
alias fn='ssh root@freenas'
alias cls='clear'
## LS ##
# ls directories
alias listdirs2='ls -d */'
alias listdirs3='ls -p . | grep -E "/$" | tr -d "/"'
alias listdirs4='ls -lA | grep -E "^d"'
alias listdirs5='ls -pv . | grep -E "/$" | tr -d "/"'
alias listdirs='ls -lAd */'
alias lsd2='ls -d */'
alias lsd3='ls -p . | grep -E "/$" | tr -d "/"'
alias lsd4='ls -lA | grep -E "^d"'
alias lsd5='ls -pv . | grep -E "/$" | tr -d "/"'
alias lsd='ls -lAd */'
# ls files
alias listfiles2='ls -p | grep -v "/"'
alias listfiles3='ls -p . | grep "/" | tr -d "/"'
alias listfiles4='ls -lA | grep -vE "^d"'
alias listfiles='ls -pA | grep -vE "/$"'
alias lsf='ls -pA | grep -vE "/$"'
alias lsf2='ls -p | grep -v "/"'
alias lsf3='ls -p . | grep "/" | tr -d "/"'
alias lsf4='ls -lA | grep -vE "^d"'
# ls normal
alias lsnormal='ls -lAh1d *'
alias lsnormal2='ls -1 .'
## /LS ##
alias ldirfind='find . -mindepth 1 -maxdepth 1 -type d -printf "%f\n"'
alias netstatgood='netstat -lanWpcv 2>/dev/null | grep tcp'
alias upgrade='sudo apt-get update && sudo apt-get upgrade -y;sudo apt-get autoremove -y; dpkg --list | grep '\''^rc'\'' | cut -d '\'' '\'' -f 3 | sudo xargs sudo dpkg --purge'
alias xclip='xclip -i -selection c'
alias clip='xclip -i -selection c'
alias setclip='xclip -i -selection c'
alias getclip='xclip -i -selection c -o'
alias apt-purge="sudo apt-get autoremove -y;sudo apt-get purge -y $(dpkg --list |grep '^rc' |awk '{print $2}')"
alias dl-video='youtube-dl -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio" --merge-output-format "mp4" $1'
alias youtube-dl2='youtube-dl --verbose --write-auto-sub --write-sub --sub-format srt -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio" --merge-output-format "mp4"'
alias youtube-dl3='youtube-dl -x --audio-format mp3 --metadata-from-title "(?P<artist>.+?) - (?P<title>.+)"'
alias youtube-dl4='youtube-dl -x --audio-format mp3 --output "%(title)s.%(ext)s" --metadata-from-title "(?P<title>)"'
alias testarg='echo $1'
#alias linode='gnome-terminal --tab --title=deb-usca-01 -- ~/Documents/scripts/linux/tmux-newsession.sh'
alias linode='ssh -t root@10.10.10.10 tmux attach-session -t 2win3pane'
alias genpass='apg -M SNCL -n 5 -a 1 -m 18 -x 20 -r ~/Documents/wordlist.txt'
alias generatepass='apg -M SNCL -n 5 -a 1 -m 18 -x 20 -r ~/Documents/wordlist.txt'
alias shred='shred -vzu'
alias rclonetrash='rclone ls --drive-trashed-only --fast-list gcrypt-usmba: | wc -l'
alias pst='ps -auxfww'
alias iostat2='sudo iostat -zyxm 5 ALL'
alias g933='sudo python3 ~/.local/share/G933-battery-information-for-linux-master/g933battery.py'
alias xfreerdpserver='xfreerdp /network:auto /auto-reconnect /monitors:0 /bpp:32 /floatbar:sticky:on /floatbar:show:always +clipboard /cert-ignore /dynamic-resolution /u:"DOMAIN\username" /p:"password" /v:server.ad.domain.int'
alias fping2='fping -loenus -p 1000 -Q 5 47.150.254.1 travisflix.com wc.4kib.com ec.4kib.com 1.1.1.1'
alias fping3='fping -loenus -p 1000 -Q 1 10.10.10.1 10.10.10.3 10.10.10.4 10.10.10.9 10.10.10.10'
alias fpingwifi='fping -l -o -I wlp0s20f3 google.com'
alias gitacp='git add -v . && git commit -a -v --allow-empty-message -m "" && git push -v'
alias esxcli2='esxcli --server vcsa70.ad.sysinfo.io --vihost 10.10.10.10 --user username --password "password" --thumbprint "[redacted]"'
alias esxcli3='esxcli -s 10.10.10.10 -u root -p "password" --protocol=https --thumbprint [redacted] network vm list'
alias renamesrt="rename -v 's/\.srt/\.en\.srt/' *.srt"
alias flac_mp3='for f in *.flac; do ffmpeg -i "$f" -b:a 320k "${f/.flac/.mp3}"; done'
alias drop_cache='sudo sync; sudo sysctl -w vm.drop_caches=1'
alias gerp='grep'
alias gepr='grep'
alias dcup='docker-compose up -d' #brings up all containers if one is not defined after dcup
alias dcdown='docker-compose stop' #brings down all containers if one is not defined after dcdown
alias dcpull='docker-compose pull' #pulls all new images unless one is specified
alias dclogs='docker-compose logs -tf --tail="50"'
alias dtail='docker logs -tf --tail="50" "$@"'
alias ec2ssh='ssh -i "$HOME/.ssh/aws-keypair.pem" ec2-user@ip.ip.ip.ip'
alias sls='screen -ls'
alias showsecureboot='mokutil --sb-state'
alias iostat1='iostat -md 2 -p /dev/nvme1n1'
alias iostatnvme='iostat -md 2 -p /dev/nvme1n1'
alias qexit='exit'
alias xit='exit'
alias ping='ping -O'
alias flatpakls='flatpak list'
alias inxi='sudo inxi -Fx -v 8'

 

Leave a Reply

Your email address will not be published. Required fields are marked *