forked from brandonwamboldt/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.aliases
44 lines (31 loc) · 1.08 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
# Easier navigation: .., ..., ...., ....., ~ and -
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ~="cd ~"
alias -- -="cd -"
# Import colors
eval `dircolors ~/.dircolors`
# See if a process is running
alias p='ps -ef | grep -v grep | grep'
# Detect which `ls` flavor is in use
colorflag="--color"
# Import colors
eval `dircolors ~/.dircolors`
# List all files colorized in long format
alias l="ls -lh ${colorflag}"
# List all files colorized in long format, including dot files
alias la="ls -lah ${colorflag}"
# List all files colorized in long format, excluding dot files
alias ll="ls -lh ${colorflag}"
# List only directories
alias lsd='ls -lh ${colorflag} | grep "^d"'
# Always use color output for `ls`
alias ls="command ls ${colorflag}"
# Enable aliases to be sudo’ed
alias sudo='sudo '
# IP addresses
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
alias localip="ipconfig getifaddr en1"
alias ips="ifconfig -a | grep -o 'inet6\? \(\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)\|[a-fA-F0-9:]\+\)' | sed -e 's/inet6* //'"