32
Red Hat and Fedora learning under GNU Free Documentation License - Copyleft (c) Acácio Oliveira 2012 d to copy and distribute verbatim copies of this license document, changing is allowed Linux Essenciais and System Administration

101 3.8 perform basic file editing operations using vi

Embed Size (px)

Citation preview

Page 1: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

Linux Essenciais and System Administration

Page 2: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

Key Knowledge Areas

Navigate a document using vi. Use basic vi modes. Insert, edit, delete, copy and find text.

Unix Commands

Perform basic file editing operations using vi

Terms and Utilities

vi /, ? h,j,k,l i, o, a c, d, p, y, dd, yy ZZ, :w!, :q!, :e!

2

Page 3: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

3

Page 4: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

4

Page 5: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

5

Page 6: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

6

Page 7: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

7

Page 8: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

8

Page 9: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

9

Page 10: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

10

Page 11: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

11

Page 12: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

12

Page 13: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

13

Page 14: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

14

Page 15: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

15

Page 16: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

16

Page 17: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

17

Page 18: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

18

Page 19: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

19

Page 20: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

20

Page 21: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

21

Page 22: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

22

Page 23: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

23

Page 24: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

24

Page 25: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

25

Range

Page 26: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

26

Character Objects

Page 27: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

27

Word Objects

Page 28: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

28

Line Objects

Page 29: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

29

Sentence Objects

Page 30: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

30

Paragraph Objects

Page 31: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

basic file editing operations using vi

vi

31

Block Objects

Page 32: 101 3.8 perform basic file editing operations using vi

Core

Lin

ux fo

r Red

Hat

and

Fed

ora

lear

ning

und

er G

NU F

ree

Docu

men

tatio

n Li

cens

e -

Copy

left

(c) A

cáci

o O

livei

ra 2

012

Eve

ryon

e is

per

mitt

ed to

cop

y an

d di

strib

ute

verb

atim

cop

ies

of th

is li

cens

e do

cum

ent,

chan

ging

is a

llow

ed

Fim de sessão

32