Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to use cat less more in Linux

Shulou Source: shulou.com Published: 2022-06-01 05:11:16 10月02日 Update

This article mainly shows you "how to use cat less more in Linux", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn "how to use cat less more in Linux" this article.

Cat-b text.c / / displays the contents of the text.c file, displays the contents of the text.c file for the non-empty output line number cat-n text.c / /, and numbers all the output lines

More command, function is similar to cat, cat command is to display the contents of the entire file from top to bottom on the screen. More will be a page-by-page display to facilitate users to read page by page, and the most basic instruction is to press the blank key (space) to display to the next page, press the b key to go back to (back) a page to display, and has the function of searching for strings. The more command reads the file back and forth, so the entire file is loaded at startup.

More text.c

The less tool is also a tool for pagination display of files or other output. It should be said that it is a tool for linux orthodox viewing the contents of files, which is extremely powerful. The usage of less is more flexible than that of more. In more, we have no way to turn to the front, we can only look back, but if we use less, we can use the function of [pageup] [pagedown] and other keys to go back and forth to browse the file, which is easier to view the contents of a file! In addition, less can have more search functions, not only to search down, but also to search up.

Less text.cy scrolls backward one line enter forward scrolls one space scrolls backward one page b scrolls forward one page / string down search string function? String up search string function Q exit above is all the content of this article "how to use cat less more in Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Files content functions characters strings commands tools articles search output one line more learning help power users methods that is screen flexibility Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple MariaDB MySQL vpn macOS