navigating forward in more pager using f

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












1















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?



enter image description here










share|improve this question


























    1















    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?



    enter image description here










    share|improve this question
























      1












      1








      1








      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?



      enter image description here










      share|improve this question














      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?



      enter image description here







      ubuntu cat text pager more






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 22 at 16:23









      NoshiiiNoshiii

      5717




      5717




















          2 Answers
          2






          active

          oldest

          votes


















          1














          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 n character). wc -l command 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 example with this content:



            006 XXn010 XXYYYYn015 XXYYYYZZZZZn


            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.






          share|improve this answer




















          • 1





            Hmmm... it's unfortunate that such a basic command is different on different Unices. On my OpenBSD system, f and Space (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.

            – Kusalananda
            Jan 22 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 the more has almost 5 pages on a 25 row terminal(i checked it by using spacebar) but when i press f at the first page it don't show the third page as expected. It shows ... skipping 24 lines and then the more exits and the prompt returns.In my case i am having five page file even then the more is not showing the third page .that's my doubt why it is showing such a behaviour?

            – Noshiii
            Jan 22 at 21:07












          • Is your MORE environment variable set to some value? Is more an alias?

            – andcoz
            Jan 23 at 9:09







          • 1





            Can you count the lines in the file using wc -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
            Jan 23 at 9:12












          • I checked echo $MORE ,it is showing an empty line and more is not an alias in my case.when i used wc -l filename it is showing 25 lines but how is it possible ? The article from where i copied the text has around 46 lines .Also i used cat -n filename to 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.

            – Noshiii
            Jan 23 at 11:57


















          1















          but it shows ...skipping 29 lines and 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.






          share|improve this answer























          • can you see my comments in the @andcoz's answer, i am having little bit trouble to understand

            – Noshiii
            Jan 23 at 12:00











          • Out of the matter, you can use the command less. My favourite.

            – jayooin
            Jan 23 at 15:20










          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f496005%2fnavigating-forward-in-more-pager-using-f%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          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 n character). wc -l command 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 example with this content:



            006 XXn010 XXYYYYn015 XXYYYYZZZZZn


            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.






          share|improve this answer




















          • 1





            Hmmm... it's unfortunate that such a basic command is different on different Unices. On my OpenBSD system, f and Space (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.

            – Kusalananda
            Jan 22 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 the more has almost 5 pages on a 25 row terminal(i checked it by using spacebar) but when i press f at the first page it don't show the third page as expected. It shows ... skipping 24 lines and then the more exits and the prompt returns.In my case i am having five page file even then the more is not showing the third page .that's my doubt why it is showing such a behaviour?

            – Noshiii
            Jan 22 at 21:07












          • Is your MORE environment variable set to some value? Is more an alias?

            – andcoz
            Jan 23 at 9:09







          • 1





            Can you count the lines in the file using wc -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
            Jan 23 at 9:12












          • I checked echo $MORE ,it is showing an empty line and more is not an alias in my case.when i used wc -l filename it is showing 25 lines but how is it possible ? The article from where i copied the text has around 46 lines .Also i used cat -n filename to 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.

            – Noshiii
            Jan 23 at 11:57















          1














          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 n character). wc -l command 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 example with this content:



            006 XXn010 XXYYYYn015 XXYYYYZZZZZn


            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.






          share|improve this answer




















          • 1





            Hmmm... it's unfortunate that such a basic command is different on different Unices. On my OpenBSD system, f and Space (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.

            – Kusalananda
            Jan 22 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 the more has almost 5 pages on a 25 row terminal(i checked it by using spacebar) but when i press f at the first page it don't show the third page as expected. It shows ... skipping 24 lines and then the more exits and the prompt returns.In my case i am having five page file even then the more is not showing the third page .that's my doubt why it is showing such a behaviour?

            – Noshiii
            Jan 22 at 21:07












          • Is your MORE environment variable set to some value? Is more an alias?

            – andcoz
            Jan 23 at 9:09







          • 1





            Can you count the lines in the file using wc -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
            Jan 23 at 9:12












          • I checked echo $MORE ,it is showing an empty line and more is not an alias in my case.when i used wc -l filename it is showing 25 lines but how is it possible ? The article from where i copied the text has around 46 lines .Also i used cat -n filename to 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.

            – Noshiii
            Jan 23 at 11:57













          1












          1








          1







          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 n character). wc -l command 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 example with this content:



            006 XXn010 XXYYYYn015 XXYYYYZZZZZn


            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.






          share|improve this answer















          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 n character). wc -l command 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 example with this content:



            006 XXn010 XXYYYYn015 XXYYYYZZZZZn


            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.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 23 at 15:02

























          answered Jan 22 at 18:13









          andcozandcoz

          12.6k33139




          12.6k33139







          • 1





            Hmmm... it's unfortunate that such a basic command is different on different Unices. On my OpenBSD system, f and Space (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.

            – Kusalananda
            Jan 22 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 the more has almost 5 pages on a 25 row terminal(i checked it by using spacebar) but when i press f at the first page it don't show the third page as expected. It shows ... skipping 24 lines and then the more exits and the prompt returns.In my case i am having five page file even then the more is not showing the third page .that's my doubt why it is showing such a behaviour?

            – Noshiii
            Jan 22 at 21:07












          • Is your MORE environment variable set to some value? Is more an alias?

            – andcoz
            Jan 23 at 9:09







          • 1





            Can you count the lines in the file using wc -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
            Jan 23 at 9:12












          • I checked echo $MORE ,it is showing an empty line and more is not an alias in my case.when i used wc -l filename it is showing 25 lines but how is it possible ? The article from where i copied the text has around 46 lines .Also i used cat -n filename to 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.

            – Noshiii
            Jan 23 at 11:57












          • 1





            Hmmm... it's unfortunate that such a basic command is different on different Unices. On my OpenBSD system, f and Space (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.

            – Kusalananda
            Jan 22 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 the more has almost 5 pages on a 25 row terminal(i checked it by using spacebar) but when i press f at the first page it don't show the third page as expected. It shows ... skipping 24 lines and then the more exits and the prompt returns.In my case i am having five page file even then the more is not showing the third page .that's my doubt why it is showing such a behaviour?

            – Noshiii
            Jan 22 at 21:07












          • Is your MORE environment variable set to some value? Is more an alias?

            – andcoz
            Jan 23 at 9:09







          • 1





            Can you count the lines in the file using wc -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
            Jan 23 at 9:12












          • I checked echo $MORE ,it is showing an empty line and more is not an alias in my case.when i used wc -l filename it is showing 25 lines but how is it possible ? The article from where i copied the text has around 46 lines .Also i used cat -n filename to 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.

            – Noshiii
            Jan 23 at 11:57







          1




          1





          Hmmm... it's unfortunate that such a basic command is different on different Unices. On my OpenBSD system, f and Space (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.

          – Kusalananda
          Jan 22 at 18:27






          Hmmm... it's unfortunate that such a basic command is different on different Unices. On my OpenBSD system, f and Space (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.

          – Kusalananda
          Jan 22 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 the more has almost 5 pages on a 25 row terminal(i checked it by using spacebar) but when i press f at the first page it don't show the third page as expected. It shows ... skipping 24 lines and then the more exits and the prompt returns.In my case i am having five page file even then the more is not showing the third page .that's my doubt why it is showing such a behaviour?

          – Noshiii
          Jan 22 at 21:07






          @andcoz i am clearly getting what you are trying to say but my doubt still remains.The file i have used with the more has almost 5 pages on a 25 row terminal(i checked it by using spacebar) but when i press f at the first page it don't show the third page as expected. It shows ... skipping 24 lines and then the more exits and the prompt returns.In my case i am having five page file even then the more is not showing the third page .that's my doubt why it is showing such a behaviour?

          – Noshiii
          Jan 22 at 21:07














          Is your MORE environment variable set to some value? Is more an alias?

          – andcoz
          Jan 23 at 9:09






          Is your MORE environment variable set to some value? Is more an alias?

          – andcoz
          Jan 23 at 9:09





          1




          1





          Can you count the lines in the file using wc -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
          Jan 23 at 9:12






          Can you count the lines in the file using wc -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
          Jan 23 at 9:12














          I checked echo $MORE ,it is showing an empty line and more is not an alias in my case.when i used wc -l filename it is showing 25 lines but how is it possible ? The article from where i copied the text has around 46 lines .Also i used cat -n filename to 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.

          – Noshiii
          Jan 23 at 11:57





          I checked echo $MORE ,it is showing an empty line and more is not an alias in my case.when i used wc -l filename it is showing 25 lines but how is it possible ? The article from where i copied the text has around 46 lines .Also i used cat -n filename to 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.

          – Noshiii
          Jan 23 at 11:57













          1















          but it shows ...skipping 29 lines and 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.






          share|improve this answer























          • can you see my comments in the @andcoz's answer, i am having little bit trouble to understand

            – Noshiii
            Jan 23 at 12:00











          • Out of the matter, you can use the command less. My favourite.

            – jayooin
            Jan 23 at 15:20















          1















          but it shows ...skipping 29 lines and 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.






          share|improve this answer























          • can you see my comments in the @andcoz's answer, i am having little bit trouble to understand

            – Noshiii
            Jan 23 at 12:00











          • Out of the matter, you can use the command less. My favourite.

            – jayooin
            Jan 23 at 15:20













          1












          1








          1








          but it shows ...skipping 29 lines and 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.






          share|improve this answer














          but it shows ...skipping 29 lines and 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.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 23 at 9:50









          jayooinjayooin

          3347




          3347












          • can you see my comments in the @andcoz's answer, i am having little bit trouble to understand

            – Noshiii
            Jan 23 at 12:00











          • Out of the matter, you can use the command less. My favourite.

            – jayooin
            Jan 23 at 15:20

















          • can you see my comments in the @andcoz's answer, i am having little bit trouble to understand

            – Noshiii
            Jan 23 at 12:00











          • Out of the matter, you can use the command less. My favourite.

            – jayooin
            Jan 23 at 15:20
















          can you see my comments in the @andcoz's answer, i am having little bit trouble to understand

          – Noshiii
          Jan 23 at 12:00





          can you see my comments in the @andcoz's answer, i am having little bit trouble to understand

          – Noshiii
          Jan 23 at 12:00













          Out of the matter, you can use the command less. My favourite.

          – jayooin
          Jan 23 at 15:20





          Out of the matter, you can use the command less. My favourite.

          – jayooin
          Jan 23 at 15:20

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f496005%2fnavigating-forward-in-more-pager-using-f%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown






          Popular posts from this blog

          Peggy Mitchell

          Palaiologos

          The Forum (Inglewood, California)