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...

  1. To begin, log in as root and type the following command to open a program that uses less for navigation:
    man man
    
  2. 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 ...

Get CentOS 7 Linux Server Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.