查看和编辑文件
学习目标
查看文件
cat file1.txt file2.txt
more /var/lib/dpkg/status
- 按空格翻页;
- 按
Enter下一行; - 按
q退出。
more
less
cat:适合较短文件或把内容送入管道。more:提供基础的逐页浏览。less:支持前后移动、搜索、跳转等更多功能,通常更适合阅读长文本。
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help