Linux命令列表:more
more命令,功能与cat相同,cat命令是设置命令整体的顶层内容。底部。 更多会逐页显示,方便用户逐页阅读,最基本的命令是按空格键(space)显示下一页,然后按b键将返回页面,并且还具有字符串搜索功能。命令more从前往后读取文件,因此整个文件在启动时就被填满。
1.命令形式
more [-dlfpcsu ] [-num ] [+/ pattern] [+ linenum] 下载地址
Shell2.命令
显示从第 从查找文件,出现字符串“ 输出: 设置每个屏幕上显示的行数 输出: 说明:如上所示 列出文件夹中的文件。因为内容太多了,所以应该学会用更多的方式来将其展示在页面上。必须与管道结合| 输出: 描述:显示 more与cat类似,用于查看文件内容,但不同之处在于more在文件中使用。页。 ,支持直接跳转等功能。 或者空格键会显示下5个文件信息.. 3.命令参数
+n 从第 n 行开始显示 -n 将屏幕尺寸定义为 n 行 + 按文件显示 + 对于前一个字符串(模式),然后从字符串的前两行显示 -c。从顶部取下屏幕,露出-d。提示“Press space to continue, ‘q’ to exit(按空格继续,按q键退出)”,去掉响铃功能-l忽略Ctrl+l(页面更改)属性 -p ?把4中的下划线去掉。需要定义常用命令
Enter down n。默认为第 1 行 Ctrl+F 滚动一屏 Ctrl+B 返回上一屏幕。 输出当前行号:f 输入文件名和当前行号V 调用vi! 命令,调用Shell,执行命令q 多出去走走5.命令示例
示例 1
3
行开始的文件内容 命令:
ShellO”put:♶O” 示例 2 more +3 log.log
line 5”的第一行,并显示前两行的结果
。命令:
Shell more +/line5 log.log
Shellthis is line 4.
this is line5.
this is line 6.
this is line 7.
this is line 8.
this is line 9.
this is line 10.
this is line 11.
this is line 12.
this is line 13.
this is line 14.
this is line 15.
this is line 16.
this is line 17.
this is line 18.
--More--(76%)
示例 3
外壳[yiibai@localhost test]$ more -5 log.log
this is line 1.
this is line 2.
this is line 3.
this is line 4.
--More--(16%)
--更多--(16 %),下面显示的是该屏幕显示的内容占文件总行数的部分。按Ctrl+F或空格键,屏幕上会显示接下来的5个内容,百分比也会相应变化。 。 示例 4
命令:
Shellls -l | more -5
Shell[yiibai@localhost /]$ pwd
/
[yiibai@localhost /]$ ls -l | more -5
total 20
lrwxrwxrwx. 1 root root 7 Feb 12 22:20 bin -> usr/bin
dr-xr-xr-x. 4 root root 4096 Feb 12 22:32 boot
drwxr-xr-x. 20 root root 3240 Feb 13 19:38 dev
drwxr-xr-x. 78 root root 8192 Feb 13 19:29 etc
drwxr-xr-x. 3 root root 20 Feb 12 22:29 home
lrwxrwxrwx. 1 root root 7 Feb 12 22:20 lib -> usr/lib
lrwxrwxrwx. 1 root root 9 Feb 12 22:20 lib64 -> usr/lib64
drwxr-xr-x. 2 root root 6 Nov 5 11:38 media
--More--
5 信息 5 C5
版权声明
本文仅代表作者观点,不代表Code前端网立场。
本文系作者Code前端网发表,如需转载,请注明页面地址。
code前端网