Create, View and Edit Text Files - RHCSA (RH124).pdf
support8872
1,222 views
12 slides
Oct 10, 2024
Slide 1 of 12
1
2
3
4
5
6
7
8
9
10
11
12
About This Presentation
Slides on how to create, view and edit text files - Part of RHCSA (RH124) syllabus
Size: 416.66 KB
Language: en
Added: Oct 10, 2024
Slides: 12 pages
Slide Content
Create, View and Edit Text Files
●Text editing tools used for creating, modifying, and viewing
text files within the Linux
●Various types of editors used in linux are Vi/Vim, Emacs, and
Nano
Command mode
In command mode you will see the filename in the
bottom
Insert mode
●In insert mode you will see ‘--INSERT--’ written in bottom .
●Now , you can add or delete text in file
Execution mode
●Enter execution mode by press Shift + :
●In this, you can save changes, quit the editor, or execute various
commands.
●For e.g- To save type :wq! And press Enter
Search
● In vi editor, press "/" followed by the keyword to search forward.
●To search backward, press "?" followed by the keyword.
Forward search Backward search
Important keys
●i -> Enter insert mode before the cursor
●x ->Delete character under the cursor
●Esc -> Exit insert mode
●dd -> Delete the current line
●u -> Undo the last change
●Ctrl-r -> Redo the last undo
●:/pattern -> Search for a pattern
●:w -> Write (save) the file
●:q -> Quit the editor
●:q! -> Quit without saving changes
●:wq -> Write and quit
Various other editors used in Linux
●Emacs: Highly extensible and customizable text editor with powerful
features, including code editing, macros, and integration with other
tools
●Nano: User-friendly, simple text editor that is ideal for quick edits and
easy navigation, making it a good choice for beginners