What does linux more mean?
In Linux, more means "more". It is a content split-screen command that can display the content of a large text file in pages, allowing users to read the content of the file page by page. It is built-in by default. In various Linux distributions, the syntax is "more [options] filename". The execution of the more command will open an interactive interface. Users can use interactive commands to view or edit content. For example, the enter key is used to move down one line, the space bar is used to move down one page, and "d" is used to move down. Half a page.
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
linux more command
In Linux, more means "more" and is a content split-screen command.
The more command can display the contents of a large text file in pages, allowing users to read the contents of the file page by page. It is built into every Linux distribution by default.
The basic format of this command is as follows:
more [选项] 文件名
more The command is relatively simple and generally does not require any options. For the options listed in Table 1, users only need to see and recognize them. .
Options | Meaning |
---|---|
-f | When calculating the number of lines, use the actual number of lines, not the number of lines after automatic line wrapping. |
-p | Instead of scrolling through each page, the screen is cleared first and then the content is displayed. |
-c | Similar to the -p option, except that the content is displayed first and other old data is cleared. |
-s | When two or more consecutive blank lines are encountered, they are replaced with one blank line. |
-u | Do not display lower quotes (depending on the terminal specified by the environment variable TERM). |
n | Display the file contents starting from line n, where n represents a number. |
-n | The number of rows displayed at one time, n represents a number. |
more The execution of the command will open an interactive interface, so readers need to understand some interactive commands. Commonly used interactive commands are shown in Table 2.
Interactive command | Function |
---|---|
h or ? | Display interactive command help for the more command. |
q or Q | Exit more. |
v | Start an editor on the current line. |
:f | Display the file name and line number of the current file. |
! | Execute the specified command in the subshell. |
Enter key | Move down one line. |
space bar | Move down one page. |
Ctrl l | Refresh the screen. |
= | Displays the line number of the current line. |
' | Go to where the last search started. |
Ctrf f | Scroll down one page. |
. | Repeat the last command entered. |
/ String | Search for the specified string. |
d | Move down half a page. |
b | Move up one page. |
more命令的使用
1、简单查看
想检查/var/log目录下的日志文件syslog,只需要键入:
$ more /var/log/syslog
然后我们可以看到在屏幕左下角有个提示,告诉我们当前的显示比例为0%。看上去这个文件相当大,所以第一页是全部页数的0%。使用空格键可以往下翻页,然后就可以看到提示的百分比会增加。
2、限制每页显示的行数
在执行more命令的时候,它会占用你终端窗口的全部空间用于显示。但是你可以通过参数-数字来限制每页显示的行数。
例如,你希望每页限制显示12行,可以通过下面的命令:
$ more -12 /var/log/syslog
现在,你会看到每页只显示12行,在按下空格键后,就会翻页显示后面的12行。
3、显示用户提示
我们知道,more命令会在显示区域的左下角提示当前内容所占的百分比。对于第一次使用more命令的人来说,他或她可能会想知道怎么才能往下翻页。为了避免这种情况,我们可以在执行时增加-d参数,这样就会额外显示一行用户提示“[按空格键继续,‘q‘推出.]
”
如果用户按了‘空格
‘或’q
‘之外的按键,more会显示一行帮助信息“ [按‘h’键查看提示。]
”
如果按下h键,会显示一个帮助信息:
一个有意思的指令是b按钮,b按钮允许你退回到前面的页面。换句话说,b按钮可以允许向前翻页。
你可以通过左上角的...前1页
信息来确认当前显示的是前面的页面。
4、从指定行开始显示
你也可以通过参数+数字来指定开始显示的行,例如,我们有一个15行的文件:
然后我们想从第5行开始显示这个文件的内容,命令看起来会是这个样子:
$ more +5 doc_30.txt
相关推荐:《Linux视频教程》
The above is the detailed content of What does linux more mean?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

DeepSeek is a powerful intelligent search and analysis tool that provides two access methods: web version and official website. The web version is convenient and efficient, and can be used without installation; the official website provides comprehensive product information, download resources and support services. Whether individuals or corporate users, they can easily obtain and analyze massive data through DeepSeek to improve work efficiency, assist decision-making and promote innovation.

There are many ways to install DeepSeek, including: compile from source (for experienced developers) using precompiled packages (for Windows users) using Docker containers (for most convenient, no need to worry about compatibility) No matter which method you choose, Please read the official documents carefully and prepare them fully to avoid unnecessary trouble.

BITGet is a cryptocurrency exchange that provides a variety of trading services including spot trading, contract trading and derivatives. Founded in 2018, the exchange is headquartered in Singapore and is committed to providing users with a safe and reliable trading platform. BITGet offers a variety of trading pairs, including BTC/USDT, ETH/USDT and XRP/USDT. Additionally, the exchange has a reputation for security and liquidity and offers a variety of features such as premium order types, leveraged trading and 24/7 customer support.

Ouyi OKX, the world's leading digital asset exchange, has now launched an official installation package to provide a safe and convenient trading experience. The OKX installation package of Ouyi does not need to be accessed through a browser. It can directly install independent applications on the device, creating a stable and efficient trading platform for users. The installation process is simple and easy to understand. Users only need to download the latest version of the installation package and follow the prompts to complete the installation step by step.

Gate.io is a popular cryptocurrency exchange that users can use by downloading its installation package and installing it on their devices. The steps to obtain the installation package are as follows: Visit the official website of Gate.io, click "Download", select the corresponding operating system (Windows, Mac or Linux), and download the installation package to your computer. It is recommended to temporarily disable antivirus software or firewall during installation to ensure smooth installation. After completion, the user needs to create a Gate.io account to start using it.

Ouyi, also known as OKX, is a world-leading cryptocurrency trading platform. The article provides a download portal for Ouyi's official installation package, which facilitates users to install Ouyi client on different devices. This installation package supports Windows, Mac, Android and iOS systems. Users can choose the corresponding version to download according to their device type. After the installation is completed, users can register or log in to the Ouyi account, start trading cryptocurrencies and enjoy other services provided by the platform.

Gate.io is a highly acclaimed cryptocurrency trading platform known for its extensive token selection, low transaction fees and a user-friendly interface. With its advanced security features and excellent customer service, Gate.io provides traders with a reliable and convenient cryptocurrency trading environment. If you want to join Gate.io, please click the link provided to download the official registration installation package to start your cryptocurrency trading journey.

This tutorial guides you through installing and configuring Nginx and phpMyAdmin on an Ubuntu system, potentially alongside an existing Apache server. We'll cover setting up Nginx, resolving potential port conflicts with Apache, installing MariaDB (
