CHAPTER 5Working with Text Files
With the creation of the Unix system, on which Linux was based, most information was managed on the system in plain-text files. Thus, it was critical for users to know how to use tools for searching for and within plain-text files and to be able to change and configure those files.
Today, configuration of Linux systems can still be done by editing plain-text files. Whether you are modifying files in the /etc directory to configure a local service or editing Ansible inventory files to configure sets of host computers, plain-text files are still commonly used for those tasks.
Before you can become a full-fledged system administrator, you need to be able to use a plain text editor. The fact that most professional Linux servers don’t even have a graphical interface available makes the need for editing of plain-text configuration files with a non-graphical text editor necessary.
After you know how to edit text files, you still might find it tough to figure out where the files are located. With commands such as find, you can search for files based on various attributes (filename, size, modification date, and ownership to name a few). With the grep command, you can search inside text files to find specific search terms.
Editing Files with vim and vi
It’s almost impossible to use Linux for any period of time and not need a text editor because, as noted ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access