』这个关键词;
:f :立刻显示出文件名以及目前显示癿行数;
q :代表立刻离开 more ,丌再显示该档案内容.
b 或[ctrl]-b :代表往回翻页,不过这动作只对档案有用,对管线无用.
大家到了这里,可以试试效果
至于less 的话,自己可以试试哦!
有些时候,我们要或许档案到内容,可能不会需要全部的,仅仅需要这个档案内的某一部分,那怎么办呢?先来交接一下head和tail 把
见例子先
[root@localhost etc]# head /etc/man.config
#
# Generated automatically from man.conf.in by the
# configure script.
#
# man.conf from man-1.6f
#
# 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
默认是输出10行到内容,那么如果要输出20行咋办呢
[root@localhost etc]# head -n 20 /etc/man.config
#
# Generated automatically from man.conf.in by the
# configure script.
#
# man.conf from man-1.6f
#
# 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
#
那么我们在日常生活中,可能,仅仅需要输入除了后面多少行到内容,比如,这行有154行的,要求,输出除后面100行的内容,也就是要求输出54行到内容,这个时候咋办呢?可以这样
[root@localhost etc]# head -n -100 /etc/man.config
#
# Generated automatically from man.conf.in by the
# configure script.
#
# man.conf from man-1.6f
#
# 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
#
# If no catdir is given, it is assumed to be equal to the mandir
# (so that this dir has both man1 etc. and cat1 etc. subdirs).
# This is the traditional Unix setup.
# Certain versions of the FSSTND recommend putting formatted versions
# of /usr/.../man/manx/page.x into /var/catman/.../catx/page.x.
# The keyword FSSTND will cause this behaviour.
# Certain versions of the FHS recommend putting formatted versions of
# /usr/.../share/man/[locale/]manx/page.x into
# /var/cache/man/.../[locale/]catx/page.x.
# The keyword FHS will cause this behaviour (and overrides FSSTND).
# Explicitly given |