Last active
August 11, 2018 04:15
-
-
Save roustem/29e72a81b7cb535afe5d8fb4c02dc4f6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
[ -z "$PS1" ] && return | |
# | |
alias ea='vi ~/.bash_aliases; . ~/.bash_aliases' | |
alias reload='source ~/.bashrc' | |
alias ll='ls -al' | |
alias l='ls -l' | |
function cd { | |
builtin cd "$@" && ls -F | |
} | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias g='git pull' | |
alias gst='git status' | |
alias b5='cd ~/go/src/github.com/agilebits/b5' | |
alias cclip='xclip -selection clipboard' | |
if [ $UID -ne 0 ]; then | |
alias reboot='sudo reboot' | |
alias update='sudo apt-get update && sudo apt-get upgrade' | |
fi | |
alias h=history | |
alias path='echo -e ${PATH//:/\\n}' | |
alias now='date +"%T"' | |
alias nowtime=now | |
alias nowdate='date +"%d-%m-%Y"' | |
alias ports='netstat -tulanp' | |
# do not delete / or prompt if deleting more than 3 files at a time # | |
alias rm='rm -I --preserve-root' | |
# confirmation # | |
alias mv='mv -i' | |
alias cp='cp -i' | |
alias ln='ln -i' | |
# Parenting changing perms on / # | |
alias chown='chown --preserve-root' | |
alias chmod='chmod --preserve-root' | |
alias chgrp='chgrp --preserve-root' | |
## pass options to free ## | |
alias meminfo='free -m -l -t' | |
## get top process eating memory | |
alias psmem='ps auxf | sort -nr -k 4' | |
alias psmem10='ps auxf | sort -nr -k 4 | head -10' | |
## get top process eating cpu ## | |
alias pscpu='ps auxf | sort -nr -k 3' | |
alias pscpu10='ps auxf | sort -nr -k 3 | head -10' | |
## Get server cpu info ## | |
alias cpuinfo='lscpu' | |
## older system use /proc/cpuinfo ## | |
##alias cpuinfo='less /proc/cpuinfo' ## | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment