Linux Command usage introduction-less command, linux Command introduction-less
The less tool is also a paging display tool for files or other outputs. It should be said that it is an orthodox linux tool for viewing file content and has extremely powerful functions. The usage of less is more flexible than that of more. At the time of more, we could not flip forward, but we could only look at it later. However, if less is used, you can use the [pageup] [pagedown] and other buttons to access and view the file, making it easier to view the content of a file! In addition, you can have more search functions in less, not only to search down, but also to search up.
1. command Format: less [parameter] File 2. command function: less is similar to more, but less allows you to browse files at will, while more can only move forward, but cannot move backward, and less does not load the entire file before viewing. 3. command Parameter:-B <buffer size> set the buffer size-e when the file is displayed, the system automatically leaves-f to force the special file to open, for example, the peripheral device code, directory, and binary file-g only mark the last search keyword-I ignore the case when the search-m shows the percentage similar to the more command-N shows the row number-o <File Name> Save less output content in the specified file-Q does not use warning sound-s to display consecutive null behavior a row-S will discard the excess part for a long time-x <number> display the "tab" key as a specified number space/string: search down the "string" function? String: the function of searching "string" up n: Repeat the previous search (and/or? Related) N: Repeat the previous search (and/or? () B flip one page backward d flip half page h display help interface Q exit less command u scroll forward half page y scroll forward one line space key scroll one line enter key scroll one page [pagedown]: scroll down a page [pageup]: Scroll up a page 4. use instance: instance 1: View File command: less log2013.log instance 2: ps to view process information and use the less paging command: ps-ef | less instance 3: view command history and use the less paging display command: history | less instance 5: browse multiple files command: Less log2013.log log2014.log Description: Enter: n, switch to log2014.log and enter: after p, switch to log2013.log5. additional remarks 1. full screen navigation ctrl + F-move one screen forward ctrl + B-move one screen backward ctrl + D-move half screen forward ctrl + U-move half screen backward 2. one-row navigation j-move one row forward k-move one row backward 3. other navigation G-Move to the last line g-Move to the first line q/ZZ-exit less command 4. other useful commands v-use the configuration editor to edit the current file h-show less help document & pattern-only show matching mode lines, instead of the entire file 5. tag navigation when you use less to view large files, you can mark any location. You can use commands to navigate to the text location marked with a specific Tag: ma-use a to mark the current position of text 'a-navigation to mark