Skip to content

Instantly share code, notes, and snippets.

@mledoze
Created September 13, 2019 08:01
Show Gist options
  • Save mledoze/a01ad4ac1e0a04cda81c9bfa0972582a to your computer and use it in GitHub Desktop.
Save mledoze/a01ad4ac1e0a04cda81c9bfa0972582a to your computer and use it in GitHub Desktop.
# ls aliases
colorflag="--color"
alias ls="ls ${colorflag}"
alias l="ls -lhF ${colorflag}"
alias ll="ls -lhF ${colorflag}"
# List all files colorized in long format, including dot files
alias la="ls -laF ${colorflag}"
# List only directories
alias lsd="ls -lF ${colorflag} | grep --color=never '^d'"
# tail
alias tf="tail -f"
# history
alias h="history"
alias hg="history | grep --color=auto"
# grep
alias grep="grep --color=auto"
# misc
alias mkdir="mkdir -p"
alias df="df -H"
alias du="du -ch"
# GIT
alias g="git"
alias go="git checkou"
alias gs="git status"
alias gc="git commit"
alias gd="git diff"
alias gb="git branch"
alias gl="git log"
alias gr="git remote -v"
# Docker
alias d="docker"
alias dm="docker-machine"
alias dc="docker-compose"
alias de="env | grep --color=auto DOCKER_"
alias dps="docker ps"
alias dpa="docker ps -a"
alias dpl="docker ps -l"
alias dim="docker images"
alias dex="docker exec -i -t"
alias db="docker build -t=$1 ."
alias dl="docker logs -f"
alias dkd="docker run -d -P"
alias dki="docker run -i -t -P"
alias drm="docker rm"
alias dri="docker rmi"
alias dip='docker inspect --format "{{ .NetworkSettings.IPAddress }}"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment