2016-04-16 16:31:54 +02:00
alias ll = 'ls -la'
alias lh = 'ls -lah'
alias ...= 'cd ../..'
alias ydl = "youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'"
alias google = 'ping -c 10240000 google.com'
alias foldersize = 'du -sh'
2019-04-19 23:54:46 +02:00
alias duf = 'du -sk * | sort -n | while read size fname; do for unit in k M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; done'
2019-02-15 23:10:39 +01:00
alias nmap_localnet = 'nmap -sP 10.0.3.0/24'
2016-04-16 16:31:54 +02:00
alias whois = "whois -h whois-servers.net"
2019-02-15 22:59:16 +01:00
alias ltmux = " if tmux has-session -t $USER ; then tmux attach -d -t $USER ; else tmux new -s $USER ; fi "
2016-04-20 10:52:38 +02:00
alias ltitle = 'echo -ne "\033]0;$HOST\007"'
2019-02-15 23:10:39 +01:00
case ` uname` in
Darwin)
# commands for OS X go here
alias flushdns = 'dscacheutil -flushcache && killall -HUP mDNSResponder'
alias htop = 'sudo htop'
alias emptytrash = "sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
alias r = 'open -a'
alias sulast = 'sudo $(history -p !-1)'
; ;
Linux)
# commands for Linux go here
; ;
FreeBSD)
# commands for FreeBSD go here
; ;
esac