Skip to content

Instantly share code, notes, and snippets.

@camilosampedro
Last active April 5, 2017 00:15
Show Gist options
  • Save camilosampedro/87c82b0fc89c9095ab5a to your computer and use it in GitHub Desktop.
Save camilosampedro/87c82b0fc89c9095ab5a to your computer and use it in GitHub Desktop.
{
echo "alias l.='ls -d .* --color=auto'"
echo "## get rid of command not found ##"
echo "alias cd..='cd ..'"
echo "## a quick way to get out of current directory ##"
echo "alias ..='cd ..'"
echo "alias ...='cd ../../../'"
echo "alias ....='cd ../../../../'"
echo "alias .....='cd ../../../../'"
echo "alias .4='cd ../../../../'"
echo "alias .5='cd ../../../../..'"
echo "alias bc='bc -l'"
echo "alias mkdir='mkdir -pv'"
echo "alias mount='mount |column -t'"
echo "alias h='history'"
echo "alias j='jobs -l'"
echo "alias now='date +\"%T\"'"
echo "alias nowtime=now"
echo "alias nowdate='date +\"%d-%m-%Y\"'"
echo "# Stop after sending count ECHO_REQUEST packets #"
echo "alias ping='ping -c 5'"
echo "# Do not wait interval 1 second, go fast #"
echo "alias fastping='ping -c 100 -s.2'"
echo "# do not delete / or prompt if deleting more than 3 files at a time #"
echo "alias rm='rm -I --preserve-root'"
echo "# confirmation #"
echo "alias mv='mv -i'"
echo "alias cp='cp -i'"
echo "alias ln='ln -i'"
echo "# Parenting changing perms on / #"
echo "alias chown='chown --preserve-root'"
echo "alias chmod='chmod --preserve-root'"
echo "alias chgrp='chgrp --preserve-root'"
echo "## pass options to free ## "
echo "alias meminfo='free -m -l -t'"
echo "## get top process eating memory"
echo "alias psmem='ps auxf | sort -nr -k 4'"
echo "alias psmem10='ps auxf | sort -nr -k 4 | head -10'"
echo "## get top process eating cpu ##"
echo "alias pscpu='ps auxf | sort -nr -k 3'"
echo "alias pscpu10='ps auxf | sort -nr -k 3 | head -10'"
echo "## Get server cpu info ## "
echo "alias cpuinfo='lscpu'"
echo "## older system use /proc/cpuinfo ##"
echo "##alias cpuinfo='less /proc/cpuinfo' ##"
echo "## get GPU ram on desktop / laptop## "
echo "alias gpumeminfo='grep -i --color memory /var/log/Xorg.0.log'"
echo "## this one saved by butt so many times ##"
echo "alias wget='wget -c'"
echo "## Easy git clonning"
echo "function gclone {"
echo " last_path=\$(pwd)"
echo " cd ~/Documentos/git/ && git clone [email protected]:camilosampedro/\"\$1\".git"
echo " cd \$last_path"
echo "}"
} >> ~/.bash_custom_aliases
echo "[[ -f ~/.bash_custom_aliases ]] && . ~/.bash_custom_aliases" >> ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment