English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
less 与 more 类似,less 可以随意浏览文件,支持翻页和搜索,支持向上翻页和向下翻页。
less [参数] 文件
参数说明:
1、查看文件
less log2013.log
2、ps查看进程信息并通过less分页显示
ps -ef |less
3View command history usage records and display them with less pagination
[root@localhost test]# history | less 22 scp -r tomcat6.0.32 [email protected]:/opt/soft 23 cd .. 24 scp -r web [email protected]:/opt/ 25 cd soft 26 ls ……Omitted……
4Browsing Multiple Files
less log2013.log log2014.log
Description:
Enter :n to switch to log2014.log
Enter :p to switch to log2013.log
1Full Screen Navigation
2Single Line Navigation
3Other Navigation
4Other Useful Commands
5Mark Navigation
When viewing large files with less, you can mark any position and navigate to the text at the marked position with a command: