-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.aliases
35 lines (32 loc) · 1.02 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
# Convenience
alias v='vim'
alias c="clear"
alias cl="clear;ls"
alias ..='cd ..'
# List all files colorized in long format
alias l="ls -l"
# List all files colorized in long format, including dot files
alias la="ls -la"
# Get latest container ID
alias dl="docker ps -l -q"
# Get container process
alias dps="docker ps"
# Get process included stop container
alias dpa="docker ps -a"
# Get images
alias di="docker images"
# Stop all containers
dstop() { docker stop $(docker ps -a -q); }
# Stop and Remove all containers
alias drmf='docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q)'
dri() { docker rmi $(docker images -q); }
# Bash into running container
dbash() { docker exec -it $(docker ps -aqf "name=$1") bash; }
# Say last n logs
alias dtail='docker logs -f --tail=20 $1'
# Count files/dirs in folder by pattern
# alias count='find $1 -maxdepth 1 -name $2 | wc -l'
# Lists all local ips
alias localips="ip -4 addr | grep -oP '(?<=inet\s)\d+(\.\d+){3}'"
# Prints existing paths on new line
alias paths='echo -e ${PATH//:/\\n}'