Last active
May 13, 2023 15:51
-
-
Save vlsulliv/eb267529526416524380d78fbbda3434 to your computer and use it in GitHub Desktop.
Bash Aliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ============================================================================= | |
# ALIASES | |
# ============================================================================= | |
# misc | |
alias rm='rm -i' | |
alias cp='cp -i' | |
alias mv='mv -i' | |
alias path='echo -e ${PATH//:/\\n}' | |
alias now='date +'%T'' | |
alias nowtime=now | |
alias nowdate='date +'%d-%m-%Y'' | |
alias grep='grep --color' | |
alias bc='bc -l' | |
alias psg='ps aux | grep -v grep | grep -i -e VSZ -e' | |
# Useful aliases, defined whether or not this shell is interactive | |
alias cls=clear | |
alias ll="ls -l" | |
alias l.="ls -A" | |
alias dir="ls -laF" | |
alias e="emacs -nw" | |
# Ls stuff | |
alias ll='ls -alF' | |
alias la='ls -A' | |
alias l='ls -CF' | |
# Go back 'x' directory levels | |
alias ...='cd ../../' # Go back 2 directory levels | |
alias ..3='cd ../../../' # Go back 3 directory levels | |
# Network control | |
alias myip='curl ipinfo.io/ip' | |
alias dnstop='dnstop -l 5 eth1' | |
alias vnstat='vnstat -i eth1' | |
alias ping='ping -c 5' # Stop after sending count ECHO_REQUEST packets # | |
alias fastping='ping -c 100 -s.2' # Do not wait interval 1 second, go fast # | |
alias ports='netstat -q' # Quickly list all listening ports | |
# File usage | |
alias df='df -H' | |
alias du='du -ch' | |
# History short cut | |
alias h.='history' | |
# vim | |
alias vi=vim | |
alias vi='vim' | |
#MISC | |
alias config='vim .bashrc' | |
alias baliases='notepad.exe .bash_aliases' | |
alias notepad='notepad.exe' | |
# VARIOUS | |
alias ct="column -t" | |
# cp hosts hosts. | |
alias d="date +%F" | |
alias dfc="df -hPT | column -t" | |
alias dr="screen -dr || screen" | |
# Colorize ls, grep, and tree | |
alias ls="ls --color=auto" | |
alias grep="grep --color=auto" | |
alias egrep="egrep --color=auto" | |
# Time in UTC | |
alias tree="tree -C" | |
alias utc="TZ=UTC date" | |
# You may uncomment the following lines if you want ls to be colorized: | |
export LS_OPTIONS="--color=auto" | |
alias ls="ls $LS_OPTIONS " | |
alias ls="ls $LS_OPTIONS" | |
alias ll="ls $LS_OPTIONS -l" | |
alias l="ls $LS_OPTIONS -lA" | |
alias ls="command ls --human-readable --group-directories-first --color=auto -I NTUSER.DAT\* -I ntuser.dat\*" | |
# Some more alias to avoid making mistakes: | |
alias rm="rm -i" | |
alias cp="cp -i" | |
alias mv="mv -i" | |
alias dnstop="dnstop eth1" | |
alias vnstat="vnstat -i eth1" | |
alias vi="vim" | |
# GIT | |
alias gts="git status -sb" | |
alias gaa="git add --all" | |
alias gc="git commit -m $2" | |
alias gp="git push" | |
alias gpo="git push origin" | |
alias gpl="git pull" | |
alias df="diff --color --color-words --abbrev" | |
### STORAGE | |
alias rm="rm -iv" | |
LS_COMMON="-hG" | |
LS_COMMON="$LS_COMMON --color=auto" | |
LS_COMMON="$LS_COMMON -I NTUSER.DAT\* -I ntuser.dat"\*" test -n "$LS_COMMON" && " | |
alias ls="command ls $LS_COMMON" | |
alias ll="ls -l" | |
alias la="ls -a" | |
alias lal="ll -a" | |
alias ls="ls -F --color=auto --show-control-chars" | |
alias st="status" | |
alias ci="commit" | |
alias sendit="git add . && git commit --amend --no-edit" | |
# Network control | |
alias myip='curl ipinfo.io/ip' | |
alias dnstop='dnstop -l 5 eth1' | |
alias vnstat='vnstat -i eth1' | |
alias ping='ping -c 5' # Stop after sending count ECHO_REQUEST packets # | |
alias fastping='ping -c 100 -s.2' # Do not wait interval 1 second, go fast # | |
alias ports='netstat -q' # Quickly list all listening ports | |
# File usage | |
alias df='df -H' | |
alias du='du -ch' | |
#MISC | |
alias config='vim .bashrc' | |
alias baliases='notepad.exe .bash_aliases' | |
alias notepad='notepad.exe' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment