Home >Operation and Maintenance >CentOS >How to open files in centos7 system
1.
cat [-n] file [|more]
Among them, file is the file to be opened. The difference between this command and vim is that it opens the file in read-only mode and cannot be edited. -n means to display the line number; |more means to display in paging, enter key to scroll down one line, space bar to scroll down one page, and q key to exit.
(Recommended tutorial: centos usage tutorial)
2.
more file
Among them, file is the file to be opened. This command will display the file in full-screen paging mode, press Enter to turn to one line, Space to turn to one page, and press Q to exit.
3.
less file
Among them, file is the file to be opened. This command is very similar to more. The difference is that the entire file will not be loaded at once, but the part to be displayed will be loaded each time. Use the space to turn the page and the q key to exit.
Recommended related video tutorials: linux video tutorial
The above is the detailed content of How to open files in centos7 system. For more information, please follow other related articles on the PHP Chinese website!