快速业务通道

Linux学习之基本概念

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-04-01
』这个关键词;

: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

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号