【命令名称】:more
【使用权限】所有人
【功能说明】:查看文件内容,只能一行一行或者一页一页的向下看,不能返回
【命令语法】:more 文件名
【常用参数】: 显示文件内容时所用的常用参数
-
空白键 (space):代表向下翻一页;
-
Enter :代表向下翻‘一行’;
-
/字串 :代表在这个显示的内容当中,向下搜寻‘字串’这个关键字;
-
:f :立刻显示出档名以及目前显示的行数;
-
n :重复前一个搜寻,与/有关
-
q :代表立刻离开 more ,不再显示该档案内容。
-
b 或 [ctrl]-b :代表往回翻页,不过这动作只对档案有用,对管线无用。
【命令实例】:
[cxc@cxcserver ~]$ more /etc/passwd #用more查看/etc/passwd
[cxc@cxcserver ~]$ more /etc/man.config #用more查看/etc/man.config
#
# Generated automatically from man.conf.in by the
# configure script.
#
# man.conf from man-1.6d
#
# For more information about this file, see the man pages man(1)
# and man.conf(5).
#
# This file is also read by man in order to find how to call nroff, less, etc.,
# and to determine the correspondence between extensions and decompressors.
---中间省略-----
/share #在文档中查看share这个字段,不要忘记打/
【命令名称】 less
【使用权限】所有人
【命令语法】 less 文件名
【功能说明】查看文件内容
【常用参数】显示文件内容时所用的常用参数
-
空白键 :向下翻动一页;
-
[pagedown]:向下翻动一页;
-
[pageup] :向上翻动一页;
-
/字串 :向下搜寻‘字串’的功能;
-
?字串 :向上搜寻‘字串’的功能;
-
n :重复前一个搜寻 (与 / 或 ? 有关!)
-
N :反向的重复前一个搜寻 (与 / 或 ? 有关!)
-
q :离开 less 这个程式;
【命令实例】
1
[cxc@cxcserver ~]$ less /etc/man.config #用LESS查看/etc/man.config,这个常用参数可以向上向下翻动文章内容
#
# Generated automatically from man.conf.in by the
# configure script.
#
# man.conf from man-1.6d
#
# For more information about this file, see the man pages man(1)
# and man.conf(5).
#
# This file is read by man to configure the default manpath (also used
# when MANPATH contains an empty substring), to find out where the cat
# pages corresponding to given man pages should be stored,
# and to map each PATH element to a manpath element.
# It may also record the pathname of the man binary. [This is unused.]
# The format is:
#
# MANBIN pathname
# MANPATH manpath_element [corresponding_catdir]
# MANPATH_MAP path_element manpath_element
----------以下省略----------------
转载于:https://blog.51cto.com/chinalscxc/1125165