main logo

Simplify your tasks: View files in just two steps

Simplify Your Tasks: View Files in Just Two Steps

 

In this post we will see how to How to view file using terminal commands in CentOS. CentOS is a Community Enterprise operating system which mainly focuses on the server. It is a part of Linux Operating System Distribution, and it is free to use. First open the terminal.

Total Time Needed: 30 Minutes

Required tools:

CentOS

Steps to view files in CentOS

Step 1 : View files
To view files use the command less . For example to view a file passwd type the command less /etc/passwd

You can see that the file is opened- The difference between cat and less is that less opens the file itself whereas cat prints the file in the terminal. To go to next page press control +f in keyboard. To go to previous page press contro+b. To quit press q.

Step 2 : Search for a particular word in the File
To search for a particular word type / and enter the word that you want. For example, to search for word ntp type /ntp and press enter.

You can see that the searched word is highlighted in black

Can creating directories in just a few steps help simplify viewing files in just two steps?

By following a simple process, you can create directories in steps, making it easier to organize and locate files. With just two steps, you can simplify the viewing of your files and access them quickly. This streamlined method can save time and improve your workflow.

Conclusion

To view a file in CentOS is as easy as these steps. If you have any doubts please reach Medha Hosting, our Linux experts will help you.
Read Here: How to compress files in CentOS?

Rakshitha
Rakshitha
Rakshitha a cloud hosting expert who helps businesses get the most out of their cloud services. She has experience setting up and managing cloud environments to improve performance and scalability. With her cloud certification, Rakshitha provides clear advice on how to use cloud solutions effectively for better business results.
Share
Contents

Related Articles

medhacloud logo
USA:
Medha Cloud Solutions LLC
30 N Gould St Ste R, Sheridan, WY 82801,
Phone: +1 646 775 2855

India:
Medha Cloud Solutions Private Limited
#74, 7th Cross, Krishna Garden InCity Layout. Chikka Kammanahalli, Banneraghatta Road, Bangalore 560083
Phone:+91 93536 44646

E-Mail: sales@medhahosting.com
©Medha Cloud 2024. All rights reserved.