Last active
April 11, 2017 02:27
-
-
Save davebeach/3438395d4732a66e2b0a7a055553102a to your computer and use it in GitHub Desktop.
.bash_alias
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
| ## For Linux Debian Jessie Distro ## | |
| ## Colorize the ls output ## | |
| alias ls='ls --color=auto' | |
| ## Use a long listing format ## | |
| alias ll='ls -la' | |
| ## Show hidden files ## | |
| alias l.='ls -d .* --color=auto' | |
| ## get rid of command not found ## | |
| alias cd..='cd ..' | |
| ## a quick way to get out of current directory ## | |
| alias 1up='cd ..' | |
| alias 2up='cd ../../../' | |
| alias 3up='cd ../../../../' | |
| alias 4up='cd ../../../../' | |
| ## Colorize the grep command output for ease of use (good for log files)## | |
| alias grep='grep --color=auto' | |
| alias egrep='egrep --color=auto' | |
| alias fgrep='fgrep --color=auto' | |
| # install colordiff package :) | |
| alias diff='colordiff' | |
| alias mount='mount |column -t' | |
| # handy short cuts # | |
| alias h='history' | |
| alias j='jobs -l' | |
| alias path='echo -e ${PATH//:/\\n}' | |
| alias now='date +"%T"' | |
| alias nowtime=now | |
| alias nowdate='date +"%d-%m-%Y"' | |
| # Show open ports | |
| 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' | |
| # install with apt-get | |
| alias apt-get="sudo apt-get" | |
| alias updatey="sudo apt-get --yes" | |
| # update on one command | |
| alias update='sudo apt-get update && sudo apt-get upgrade' | |
| ## 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' | |
| ## Google Cloud ## | |
| alias serverstart='sudo /opt/bitnami/ctlscript.sh start' | |
| alias serverrestart='sudo /opt/bitnami/ctlscript.sh restart apache' | |
| alias serverstop='sudo /opt/bitnami/ctlscript.sh stop' | |
| alias serverservices='sudo /opt/bitnami/ctlscript.sh' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment