Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Linux, the top command has a "batch mode": top -b -n 1 to print the output a set number of times. On Mac, it seems that the top command does not have batch mode (certainly the -b option does not exist).

How can I emulate top -b -n 1 on a Mac?

share|improve this question
up vote 6 down vote accepted

There's logging mode, with an argument specifying how often output will be repeated, 0 being until aborted. To print once and exit:

$ top -l 1
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .