-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_aliases
88 lines (75 loc) · 2.03 KB
/
.bash_aliases
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# bash aliases
alias rmr='rm -rf'
alias reload='source ~/.bash_profile'
alias ip="curl -s http://www.showmyip.com/simple/ | awk '{print $1}'"
# dir traversals
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
# lock computer
alias lock='/System/Library/CoreServices/"Menu Extras"/User.menu/Contents/Resources/CGSession -suspend'
# some more ls aliases
#alias ll='ls -l'
alias ll='ls -lhaGrt'
alias lart='ls -lart'
alias la='ls -A'
alias lh='ls -lSh'
alias l='ls -CF'
# grep
alias grep='grep --color=auto -n'
alias g='grep -ri --color=auto -n'
alias gj='grep -ri --include=*.java --exclude=*/test/* --color=auto -n'
alias gjt='grep -ri --include=*.java --color=auto -n'
alias gx='grep -ri --include=*.xml --color=auto -n'
# hadoop
alias hls='hadoop fs -ls'
alias hcat='hadoop fs -cat'
alias hdus='hadoop fs -dus'
alias hrmr='hadoop fs -rmr'
alias hrmrs='hadoop fs -rmr -skipTrash'
alias hput='hadoop fs -put'
alias hget='hadoop fs -get'
alias hkill='hadoop job -kill'
alias hjar='hadoop jar'
# mfu grep commands
alias h="history|grep "
alias f="find . |grep "
alias p="ps -ef |grep "
# file operations
alias l="less"
alias m="more"
alias c="cat"
alias t="touch"
alias v="vim"
alias e="emacs"
# git aliases
alias gis='git status'
alias gif='git diff'
alias gic='git commit -m'
alias gica='git commit -am'
alias gil="git log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
# svn
alias sup='svn up'
alias sco='svn co'
alias sci='svn ci'
alias sta='svn status'
alias sdif='svn diff'
alias srm='svn rm'
alias smv='svn mv'
# various aliases
alias ':e'='vim'
alias ':WM'='make'
alias earlier='touch -d 1999-12-31'
alias rbackup='rsync -ghlport'
# du aliases
alias duh='du -sh'
duh1() {
du -h --max-depth=1 "$@" | sort -h
}
VLESS=$(find /usr/share/vim -name 'less.sh')
if [ ! -z $VLESS ]; then
alias less=$VLESS
fi
# ui
alias cleaninstallui='rm -rf node_modules && rm -rf bower_components && npm cache clean && bower cache clean && npm install && bower install'