It is given in the man page of more that f is used to skip forward k screenful of text(default to 1).I saved a very long file using cat and used more to show it on the screen page by page but when i pressed f on the first page itself, it is not navigating forward but it shows ... skipping 29 lines and then the file closes and the prompt returns.When i try to navigate with spacebar it is working properly as expected. As file length is sufficiently long,it should navigate forward by skipping 1 page each time. Why it is showing such a different behviour?
2 Answers
Try this experiment:
- Open a terminal with 25 rows.
- Run seq 1 1 100 > test_text.
- Run more test_text.
- Look at the line before last on your screen. It'd say 24.
- Press f to skip a page.
- Look at the first line on screen. It'd say 49.
f skips a page of text. So you saw the first "page" of the file, you pressed f, and you saw the third page.
At this point, if you press f again, you'll see ... skipping 24 lines and the last 4 lines of the file. more'll exit because there are not enough lines to show a fifth page.
Try again using space instead. space does not skip pages. You'll see all the pages.
Edit
This answer refers to more version 5.19 (Berkeley 6/29/88), which is currently in use in the Linux community (see man more). As @Kusalananda reports, the result of the "experiment" may vary on different versions/unices.
Difference between a line and a row of text on a terminal
Often these two definitions are interchangeable. In this case, it is important to distinguish them.
- A line is a sequence of characters in a text file that ends with a newline (the \ncharacter).wc -lcommand counts the number of lines in a file. The length of a line can be any number between zero and infinite.
- A row of text (on a terminal) is a sequence of characters displayed on a terminal. It has the fixed length of the width of the terminal.
My first "experiment" was too simple, all the lines were (quite for sure) shorter than rows.
In your file, probably, the lines are way longer than rows. To display them, more will arrange each line on multiple rows.
Let's try a new experiment:
- Create a file - examplewith this content:- 006 XX\n010 XXYYYY\n015 XXYYYYZZZZZ\n- This is a 3 line file. The length of each line is, in the order: 6, 10 and 15 characters. Do not forget to count the space after the number. 
- Run - wc -l example. 3 is the result.
- On a 8 columns terminal, you should see something like - 006 XX 010 XXYY YY 015 XXYY YYZZZZZ- The first row is 8 character lenght: - 006+ a space +- XX+ 2 spaces.- The second row is 8 character lenght: - 010+ a space +- XXYY.- The 3rd row is 8 character lenght: - YY+ 8 spaces.- Etc etc. 
Your 3 lines of text are now 5 rows of text.
The manual page of more says:
 f         Skip forward k screenfuls of text.  Defaults to 1.
This means that more will skip so many line of text to fill all the rows of the terminal.
- 
        1Hmmm... it's unfortunate that such a basic command is different on different Unices. On my OpenBSD system,fandSpace(and^F) are exactly equivalent according to the manual. I see now that this is different on Linux, which is why I was confused by the question at first.2019-01-22 18:27:52 +00:00Commented Jan 22, 2019 at 18:27
- 
        @andcoz i am clearly getting what you are trying to say but my doubt still remains.The file i have used with themorehas almost 5 pages on a 25 row terminal(i checked it by using spacebar) but when i pressfat the first page it don't show the third page as expected. It shows... skipping 24 linesand then themoreexits and the prompt returns.In my case i am having five page file even then themoreis not showing the third page .that's my doubt why it is showing such a behaviour?LocalHost– LocalHost2019-01-22 21:07:11 +00:00Commented Jan 22, 2019 at 21:07
- 
        Is yourMOREenvironment variable set to some value? Ismorean alias?andcoz– andcoz2019-01-23 09:09:20 +00:00Commented Jan 23, 2019 at 9:09
- 
        1Can you count the lines in the file usingwc -l filename? Is it possible that your file have less than 50 lines but that some line are longer than the width of terminal window?andcoz– andcoz2019-01-23 09:12:52 +00:00Commented Jan 23, 2019 at 9:12
- 
        I checkedecho $MORE,it is showing an empty line andmoreis not an alias in my case.when i usedwc -l filenameit is showing 25 lines but how is it possible ? The article from where i copied the text has around 46 lines .Also i usedcat -n filenameto check number of lines and it is taking whole paragraphs as a single line and it is also showing 25 lines in total . How do i check whether my lines are longer than the width of the terminal window, as long lines fit themselves according to the size of terminal.LocalHost– LocalHost2019-01-23 11:57:53 +00:00Commented Jan 23, 2019 at 11:57
but it shows
...skipping 29 linesand then the file closes and the prompt returns
That happens when you press f and you reach the end of the document. 
For example: You have a file of 40 lines, you do more myfileof60lines.txt, it displays the 29 first lines, then you press f, so it will skip the 29 next lines, but before that, it reaches the end of the document. So you end up with seeing ...skipping 29 lines, and the normal behavior of more when it reaches the end of the document, which is a return to prompt.
- 
        can you see my comments in the @andcoz's answer, i am having little bit trouble to understandLocalHost– LocalHost2019-01-23 12:00:57 +00:00Commented Jan 23, 2019 at 12:00
- 
        Out of the matter, you can use the commandless. My favourite.jayooin– jayooin2019-01-23 15:20:03 +00:00Commented Jan 23, 2019 at 15:20
