Linux基础学习04——文本文件查看命令

Linux 系统中“一切都是文件”,对服务程序进行配置实际上也就是编辑程序的配置文件。

1. cat命令

cat命令用于查看纯文本文件(内容较少的),英文全称为“concatenate”。
语法格式:

cat [参数] 文件名称

如果想显示行号,可以加上参数-n。

cat -n 文件名称

例如,查看当前用户在本机上执行的Linux命令历史记录信息。
不显示行号:
在这里插入图片描述
显示行号:
在这里插入图片描述

2.more命令

more命令用于查看纯文本文件(内容较多的)。
语法格式:

more [参数] 文件名称

对于长篇的文本内容,推荐使用more命令来查看。more命令会在最下面使用百分比的形式来提示您已经阅读了多少内容;还可以使用空格键或回车键向下翻页。

[sihebaiguo@localhost ~]$ more brltty.conf
# Documents/brltty.conf.  Generated from brltty.conf.in by configure.
###############################################################################
# BRLTTY - A background process providing access to the console screen (when in
#          text mode) for a blind person using a refreshable braille display.
#
# Copyright (C) 1995-2013 by The BRLTTY Developers.
#
# BRLTTY comes with ABSOLUTELY NO WARRANTY.
#
# This is free software, placed under the terms of the
# GNU General Public License, as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any
# later version. Please see the file LICENSE-GPL for details.
#
# Web Page: http://mielke.cc/brltty/
#
# This software is maintained by Dave Mielke <dave@mielke.cc>.
###############################################################################

# This is a configuration file template for the BRLTTY application. 
# Uncomment those entries which apply to your personal needs and system
# requirements.

# BRLTTY expects to find its configuration file in "/etc/brltty.conf"
# (can be overridden with the -f [--configuration-file=] option).
# If it doesn't exist, then BRLTTY silently continues but may require
# that certain command line options be explicitly supplied.

--More--(5%)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值