wiki/运维/操作系统/Linux/笔记/10.文本查看.md
2025-01-02 10:46:09 +08:00

28 lines
626 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 1、文本编辑器
全屏编辑器nano
图形化工具vi、vim
## 2、文本查看器
##### 2.1 cat
-E输出行结束符
-A显示所有控制符
-n显示编号
-b非空行编号
-s连续空行压缩成1行
##### 2.2 tac从后向前显示文本
##### 2.3 more分页显示
空格:下翻
b上翻
##### 2.4 head显示文本前面或者后面的行内容
-c获取前x字节
-n获取前x行如果为负数则取倒数第几行
##### 2.5 tail查看文本倒数几行的内容
-n x置顶获取后x行
-f追踪
##### 2.6 hexdump 查看非文本文件内容