Skip to main content
Engineering LibreTexts

05-A.1: Creating and Editing Text files

  • Page ID
    29481
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    EXAM OBJECTIVES COVERED
    2.3 Given a scenario, create, modify, and redirect files.

    Module Introduction

    We have covered quite a bit of ground already in this course. Now it is time to begin the managing of data itself. The management of files and directories allows us to quickly create and retrieve process data so that it provides the information we will need to benefit our company, our users and ourselves as we serve as system administrator for our Linux systems.

    Module Objectives

    In this lesson, we will:

    • Learn to create and edit text files.
    • Understand how to search for files on a Linux system.
    • Execute various operations on files and directories. We will view, copy, and delete files.
    • Manage text files to make it easier to analyze and use.
    • Manipulate file output through redirection, piping, etc.

    Text Editors

    Many of us are familiar with some form of a text editor. Windows Notepad is probably the simplest text editor available. A text editor provides the simple ability to create, edit and view text documents. In the world of Linux administration we find text editors useful because most of the files that we have to modify or view are text files. The reason we don't use a word processor is that word processors introduce various formats for their resulting files; they are not text files.

    Some of the more traditional Linux text editors:

    • vi / Vim / gVim - these are all the same family of editors. vi was the original tool, then later editions became Vim (vi iMproved). Vim was the default editor of Linux, while gVim is a graphical version of Vim.
    • GNU nano - a very simple text editor found in Linux. There is not a graphical version of nano.
    • gedit - this editor runs in a graphical interface in the Linux environment.
    • Emacs - a LONG time part of Unix and Linux. It is a powerful and very flexible tool that can be configured to handle a variety of tasks.

    We will take a brief look at a couple of the editors over the next several pages.

     


    This page titled 05-A.1: Creating and Editing Text files is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Patrick McClanahan.

    • Was this article helpful?