-
Notifications
You must be signed in to change notification settings - Fork 0
/
bash-aliases-extra
72 lines (63 loc) · 2.22 KB
/
bash-aliases-extra
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
## basic helpfull alias
alias ssh='ssh -vC'
alias pid=' ps aux -ww|cut -d : -f 2'
alias l='ls -lGh'
alias lt=' ls -ltras'
alias ll=' ls -lhaGs'
alias la='ls -latrhsGC'
alias las='ls -ltras'
alias dir='ls -lGC'
alias die='killall ssh'
alias hist='history |grep $1'
alias fdupe='fdupes -rndfS'
alias nstat='netstat -antp |grep LISTEN'
alias fuck='sudo !!'
alias syslog='tail -f /var/log/syslog'
alias put='sudo apt-get -y install $1'
alias hosts='cat ~/.ssh/config |grep Host |grep -iv Name'
alias Escritorio='cd ~/Desktop'
alias escritorio='cd ~/Desktop'
alias descargas='cd ~/Downloads'
alias downloads='cd ~/Downloads'
alias pong='ping google.es'
alias desktop='cd ~/Desktop'
alias c='clear'
alias e='exit'
## Virtualbox
alias listvms='VBoxManage list vms'
# apple mac aliases
alias tmstatus='watch -n2 tmutil status'
alias flushcache='sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder; say cache flushed'
alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
alias ShowFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
alias finderKill="killall Finder"
## Docker alias
alias dps='docker ps'
alias drm='docker rm $1'
alias dstop='docker stop $1'
## killing in the name of
## for i in `docker ps |awk {'print $1'} | grep '[a-z,0-9]'`; do docker stop $i;done
alias dkill='docker kill $(docker ps -q)'
## stats
alias dstats='docker stats $(docker ps --format={{.Names}})'
# Delete all containers
alias dockerclean='docker system prune'
# Delete all images
alias dockerrmi='docker rmi -f $(docker images -q)'
## remove all non-running containers
alias dclean='docker rmi $(docker images --filter dangling=true -q --no-trunc)'
## run interactive containers
alias dki="docker run -t -i -P"
## docker container names
alias dnames="docker ps | awk '{print $NF}'"
## docker images list
alias dimages="docker images |awk {'print $1,\"- \"$2'}"
## K8 alias
alias getpods="kubectl get pods"
alias getallpods="kubectl get pods --all-namespaces"
alias getnodes="kubectl get nodes"
alias getservices="kubectl get services"
alias getdep="kubectl get deployments"
alias kc="kubectl"
alias getports="kubectl get svc"
## aliases End