11
By : Varnnit Jain 9990888972 Text Editor In Red Hat Enterprise Linux

Text editor In RHEL

Embed Size (px)

Citation preview

Page 1: Text editor In RHEL

By : Varnnit Jain9990888972

Text Editor In Red Hat Enterprise Linux

Page 2: Text editor In RHEL

Text EditorsAs the name suggest, text editors are files

or programs that are used for editing the plain text files.

In Windows such programs are known as “notepads” software.

Text editors are provided with the operating system and software development packafes, and can be used to change the configyration files, documentation files and programming languagres source code.

In linux there are basically two main types of text editors : vi (visual) and vim (visual Improved).

Page 3: Text editor In RHEL

Vi (Visual) EditorPronounced as vee-eye.It provides basic text editing capabilities.There are two mode in Vi : Insert mode and

Command Mode.It begins with command mode. We can switch to the

insert mode by pressing i.i is used to open the insert mode whereas esp can

be used to switch back to the command mode.We can type whatever e want in the insert mode.iq! is used to exit without saving the textiwq! Is used to save and exit.iw! Is used to save the file.

Page 4: Text editor In RHEL

Vim (Visual Improved) EditorIt is the newer version of the vi text editor.Vim is especially designed for the Linux

Operating system not for Unix.In vim we can open multiple files on to the

same screen having different buffers.

Page 5: Text editor In RHEL

Commands for vi and vimi : For insert mode.Esc : For command mode.iw : To save the file after exiting insert mode.iq : Exit without save.iwq : Save and exit.iq! : Forcefully exit.iwq! : Forcefully save and exit.yy : copy (vi mode).dd : deleting or cutting a particular line.p : Paste

Page 6: Text editor In RHEL

Commands for vi and vim (cont.)yy : Copy 1 line.4yy : Copy 4 lines.dd : Delete 1 line.4dd : Delete 4 lines.yw : Copy 1 word.Shift + g : Go to the end of the page.u : UndoCtrl + r : Redo

NOTE : All these commands are given in thee command mode.

Page 7: Text editor In RHEL

Managing files from the command lineCreate a file and add some characters to it.#head <filename> : To show top 10

lines.#head –n 5 <filename> : To show top 5

lines.#tail <filename> : To show

bottom 10 lines.#tail –n 5 <filename> : To show

bottom 5 lines.FOR EXAMPLE : Lets create a file and name it

as testing.

Page 8: Text editor In RHEL

This is the Insert Mode.

Use The Command :iq in the command mode to exit the file without saving it.

Page 9: Text editor In RHEL

Use The Command :iwq in the command mode to exit the file after saving it.

Use The Command #head <file name> in the terminal to show the top 10 lines of the file.

Page 10: Text editor In RHEL

Use The Command #tail <file name> in the terminal to show the top 10 lines of the file.

Use The Command #tail <file name> in the terminal to show the top 10 lines of the file.

Page 11: Text editor In RHEL