-
Notifications
You must be signed in to change notification settings - Fork 0
/
.aliases
56 lines (45 loc) · 1.59 KB
/
.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
#!/bin/bash
alias -- -='cd - && pwd'
alias ..='cd .. && pwd'
alias ...='cd ../.. && pwd'
alias ....='cd ../../.. && pwd'
alias cd..='cd .. && pwd'
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias grep='grep --color=always'
# alias grep='grep --color=auto' # not working in some pipes
# ----------------------------------------------------------------------
alias cp='cp -iv'
# │└─ list copied files
# └─ prompt before overwriting an existing file
alias mkdir='mkdir -pv'
# │└─ list created directories
# └─ create intermediate directories
alias mv='mv -iv'
# │└─ list moved files
# └─ prompt before overwriting an existing file
# ----------------------------------------------------------------------
alias n='nautilus .'
alias d='dolphin .'
alias ip='hostname -I'
alias path='printf "%b\n" "${PATH//:/\\n}"'
alias jpp='pidof java | sudo xargs pwdx' # java process's path, jps++
alias tls='tmux ls'
# my default workspace
#alias tt='tmux new-session -A -s default' # sounds not stable
alias tt='tmux ls 2> /dev/null | grep default > /dev/null 2>&1; [[ $? == 0 ]] && tmux attach -t default || tmux new -s default'
# integrated and fast service status
alias ss='sudo systemctl --full --type=service --all | grep -i \
"kafka\
\|zookeeper\
\|elasticsearch\
\|logstash\
\|filebeat\
\|grafana\
\|kibana\
\|prometheus\
\|fluent-bit"'
# ----------------------------------------------------------------------
# Load OS specific aliases, if any
[ -f $OS/bash_aliases ] && source $OS/bash_aliases