I'm used to typing free -m in ubuntu to see how much memory is available, in MB. What's the equivalent command in Mac OSX?

Since OS X is BSD-based, your best bet will be using sysctl to get the information you need.

sysctl -a | awk '/hw./' && '/mem/'

You could also try this:

https://apple.stackexchange.com/questions/4286/is-there-a-mac-os-x-terminal-version-of-the-free-command-in-linux-systems

  • Thanks, that's close, the other question has some good suggestions. – jimbojw Dec 19 '12 at 20:53

should be :

sysctl -a | awk '/hw./' && '/mem/'  

(note the '/mem/')

then run the output through egrep (depending upon what is desired).

There are some perl scripts too - on the net.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.