Skip to content

Instantly share code, notes, and snippets.

@mctolentino
Created March 23, 2015 02:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mctolentino/2b658b084a617a40ab2c to your computer and use it in GitHub Desktop.
Save mctolentino/2b658b084a617a40ab2c to your computer and use it in GitHub Desktop.
Custom Aliases
# Aliases
alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
alias mkdir="mkdir -p"
alias reloadbash='source ~/custom-alias.sh'
alias editbash='vi ~/custom-alias.sh'
alias psg="ps aux | grep -v grep | grep -i -e VSZ -e"
alias ls='ls -h'
alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'
alias sl="ls"
alias projects='cd /devp/projects'
alias home='cd ~'
alias df="df -Tha --total"
alias du="du -ach | sort -h"
alias dev='cd /devp'
# Functions
function psgrep() {
if [ ! -z $1 ] ; then
echo "Grepping for processes matching $1..."
ps aux | grep $1 | grep -v grep
else
echo "!! Need name to grep for"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment