When I run the command:

man fork

There is a highlight line at the bottom that reads:

Manual page fork(2) line 52/99 (END)

But when I navigate to line 53 and up to 99, these are just blank lines. Why does Linux system have these extra lines? What are their main purpose?

  • What OS? My CentOS 4's pager ends where I would expect it to. – Aaron D. Marasco Jul 15 '11 at 1:45
  • I'm currently running Ubuntu 11.04. Thank you. – Chan Jul 15 '11 at 1:46
  • I cannot reproduce this with xUbuntu 10.4.2. It ends where the text ends. – user unknown Jul 15 '11 at 4:43

The document you're viewing (the man page) has 99 lines. If you scroll to the bottom of the document, the 99th line will be at the bottom of the terminal. The pager (less) reports the line number at the top of the terminal: when you're at the top of the document, you'll see line 1/99; at the bottom, you see line 52/99 because you have a 49-line terminal (showing the last 48 lines, i.e. 52 to 99, plus the less status line).

Less doesn't normally scroll beyond the last line of the document. But if you explicitly tell it to (e.g. with 53g to put the 53rd line at the top of the screen), it adds empty lines (actually, lines with a ~, unless you run less -~).


The number of columns and lines as reported in the pager at the bottom of the man page will vary according to the size of the terminal you open the man page in.

So there are no "extra lines" as such: only variances as the output of the man command is printed, with all the requisite formatting, to the available terminal dimensions.

  • Thank you. By the size of terminal, did you mean its width and height? I guess not because any modification to the size of terminal did not affect the result. – Chan Jul 15 '11 at 2:02
  • Yes. If you open a second terminal, with different dimensions, you will be able to see the different impact on the layout between the two. – jasonwryan Jul 15 '11 at 2:06
  • I think I understand what's bothering Chan. Your answer put me on the track, but this is unrelated to man: it's about less. – Gilles Jul 15 '11 at 10:39
  • Ah! I hadn't grasped that he was referring to more than a single blank line. Good catch. – jasonwryan Jul 15 '11 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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