- CentOS 7 Linux Server Cookbook(Second Edition)
- Oliver Pelz Jonathan Hobson
- 246字
- 2021-07-23 14:28:51
Navigating text files with less
Throughout this book, you will often use programs and tools that use the program less or a less-like navigation to view and read file content or display output. At first, the control can seem a bit unintuitive .Here, in this recipe, we will show you the basics of how to navigate through a file using less controls.
Getting ready
To complete this recipe, you will require a working installation of the CentOS 7 operating system with root privileges.
How to do it...
- To begin, log in as root and type the following command to open a program that uses less for navigation:
man man
- To navigate, press the up and down key to scroll up and down one line at a time, the spacebar to scroll down a page, and the b key to scroll up a page. You can search within the text using the forward slash key, /,followed by the search term, then press Return to search. Press n to jump to the next search result. Press the q key to exit.
How it works...
Here, in this short recipe, we have shown you the very basics of less navigation, which is essential for reading man pages and is used by a lot of other programs throughout this book to display text. We only showed you the basic commands and there is much more to learn. Please read the less manual to find out more on man less
command.
- Reporting with Visual Studio and Crystal Reports
- C#完全自學教程
- Java高手真經(高級編程卷):Java Web高級開發技術
- Python高效開發實戰:Django、Tornado、Flask、Twisted(第2版)
- Python機器學習算法與實戰
- Linux命令行與shell腳本編程大全(第4版)
- Go并發編程實戰
- Java系統化項目開發教程
- Active Directory with PowerShell
- 好好學Java:從零基礎到項目實戰
- 新一代SDN:VMware NSX 網絡原理與實踐
- The Professional ScrumMaster’s Handbook
- Unity 3D腳本編程:使用C#語言開發跨平臺游戲
- R數據科學實戰:工具詳解與案例分析
- C語言程序設計習題與實驗指導