3.8.2 查看整个文件
// cat命令是显示文本文件中所有数据的得力工具
cat 文件名
-n参数会给所有行加上行号
cat -n test1
1
2
3
4
5
-b 参数 只给有文本的行加上参数
-T 参数 不让制表符出现
cat命令的主要缺陷是:一旦运行 你就无法控制后面的操作
2.more 命令 more命令会显示文本文件的内容,但会在显示每页数据之后停下来.
more /etc/bash.bashrc
more命令是分页工具..类似于man命令操作
3.less命令
Less is a program similar to more (1), but which allows backward move-
ment in the file as well as forward movement. Also, less does not have
to read the entire input file before starting, so with large input
files it starts up faster than text editors like vi (1). Less uses
termcap (or terminfo on some systems), so it can run on a variety of
terminals. There is even limited support for hardcopy terminals. (On
a hardcopy terminal, lines which should be printed at the top of the
screen are prefixed with a caret.)
Commands are based on both more and vi. Commands may be preceded by a
decimal number, called N in the descriptions below. The number is used
by some commands, as indicated.

浙公网安备 33010602011771号