Path

mate ~/.bash_profile

 

export PATH=/myfolders/bin:$PATH

 

source ~/.bash_profile

 

 


Tree

(How to install using MacPorts)

sudo port install tree

 

Show the current path in in OSX

 pwd

 

Open a window based on the folder in terminal

 open .

 

How to find the path to a command file

which {command-name}


Which alias' are set up

 alias

 

How to create an alias

 ~/.bashrc

alias name='command arg1 arg2'


MEMORY INFORMATION

## 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' ##
 
## get GPU ram on desktop / laptop## 
alias gpumeminfo='grep -i --color memory /var/log/Xorg.0.log'