- 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.
- SPSS數據挖掘與案例分析應用實踐
- Python從小白到大牛
- Raspberry Pi Networking Cookbook(Second Edition)
- 程序員面試算法寶典
- JavaScript+jQuery開發實戰
- Unity 2018 Shaders and Effects Cookbook
- Django 3.0入門與實踐
- Clean Code in C#
- 計算機應用基礎項目化教程
- Getting Started with Electronic Projects
- 實戰Python網絡爬蟲
- 從“1”開始3D編程
- SQL Server 2008實用教程(第3版)
- Mastering ArcGIS Server Development with JavaScript
- 讀故事學編程:Python王國歷險記