0

How do I get the first 20 lines of a OS X Terminal result?

2

The command you want is head

so for a command x and the first 20 lines you enter

x | head -n 20

This runs x and pipes the input into the head command.

2

If the output is from a command you are running, you can pipe the output to the head command.

$ ls -l | head -n 10

You must log in to answer this question.

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