more (more) 該命令一次顯示一屏文本,滿屏後停下來,而且在屏幕的底部出現一個提示信息,給出至今己顯示的該文件的百分比,方便逐頁閱讀(file perusal filter for crt viewing) 。more名單中內置了若干快捷鍵,按空白鍵(space)就往下一頁顯示,按 b 鍵就會往回(back)一頁顯示,並且還有搜尋字串的功能(與 vi 類似),使用中按h能夠查看說明文件 。oracle
more [-dlfpcsu] [-num] [+/pattern] [+linenum] [fileNames..]
------------------------------------------------------------------------------- 空格鍵 向下滾動一屏 z Display next k lines of text [current screen size]* <return> Display next k lines of text [1]* d or ctrl-D Scroll k lines [current scroll size, initially 11]* q or Q or <interrupt> 退出more s Skip forward k lines of text [1] f Skip forward k screenfuls of text [1] b or ctrl-B 返回上一屏 ' 跳轉到上次查找開始的位置 = 輸出當前行的行號
/
模式 查找符合模式的內容,按n爲下一個,N爲上一個 n Search for kth occurrence of last r.e [1]!命令 or :! 命令 調用Shell,並執行命令
[root@oracledb log]# more -dc boot.log
[root@oracledb log]# more -5 boot.log Welcome to CentOS Starting udev: [ OK ] Setting hostname oracledb: [ OK ] Setting up Logical Volume Management: [ OK ] Checking filesystems--More--(9%)
按空格鍵顯示5-10行,不清屏oop
[root@oracledb log]# more -5 boot.log Welcome to CentOS Starting udev: [ OK ] Setting hostname oracledb: [ OK ] Setting up Logical Volume Management: [ OK ] Checking filesystems /dev/sda3: clean, 167181/6152192 files, 4828976/24590080 blocks /dev/sda1: clean, 51/51200 files, 103880/204800 blocks [ OK ] Remounting root filesystem in read-write mode: [ OK ] Mounting local filesystems: [ OK ]--More--(21%)
[root@oracledb log]# more -p -5 boot.log Welcome to CentOS Starting udev: [ OK ] Setting hostname oracledb: [ OK ] Setting up Logical Volume Management: [ OK ] Checking filesystems --More--(9%)
按空格ui
/dev/sda3: clean, 167181/6152192 files, 4828976/24590080 blocks /dev/sda1: clean, 51/51200 files, 103880/204800 blocks [ OK ] Remounting root filesystem in read-write mode: [ OK ] Mounting local filesystems: [ OK ] --More--(21%)
[root@oracledb log]# more +10 boot.log Mounting local filesystems: [ OK ] Enabling local filesystem quotas: [ OK ] Enabling /etc/fstab swaps: [ OK ]
[root@oracledb study]# more -s test.log 2016 2017 2018前面有兩空行
六、more進行中!執行命令spa
!ifconfig eth5 Link encap:Ethernet HWaddr 08:00:27:60:11:C4 inet addr:172.17.22.31 Bcast:172.17.23.255 Mask:255.255.254.0 inet6 addr: fe80::a00:27ff:fe60:11c4/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:13261006 errors:0 dropped:0 overruns:0 frame:0 TX packets:55082 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:941658780 (898.0 MiB) TX bytes:5059734 (4.8 MiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:16 errors:0 dropped:0 overruns:0 frame:0 TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1584 (1.5 KiB) TX bytes:1584 (1.5 KiB) ------------------------ --More--(9%)
# Mandatory: no # Range: 60-3600 # 上面爲more的顯示內容/Hostname=Zabbix server
查找出的結果在最上面顯示code
...skipping # Hostname= Hostname=Zabbix server ### Option: HostnameItem # Item used for generating Hostname if it is undefined. Ignored if Hostname is defined. # Does not support UserParameters or aliases.