Skip to content

Instantly share code, notes, and snippets.

@remear
Created April 12, 2012 19:30
Show Gist options
  • Save remear/2370372 to your computer and use it in GitHub Desktop.
Save remear/2370372 to your computer and use it in GitHub Desktop.
Free Memory Command on OS X
echo -e "\n$(top -l 1 | awk '/PhysMem/';)\n"
=> PhysMem: 1701M wired, 6232M active, 976M inactive, 8909M used, 3376M free.
Add to ~/.bash_profile
alias freemem="top -l 1 | awk '/PhysMem/'"
A more brief output:
top -l 1 | awk '/PhysMem:/ {print $10}'
=> 3362M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment