Linux - Nano editors
10K views
Nov 28, 2024
Linux - Nano editors
View Video Transcript
0:00
so let us start with using on nanometers
0:03
so as I said you can use it any of the
0:05
terminal any of the distributors even in
0:08
the UNIX operating system or the Linux
0:09
operating system for using the Nano
0:12
editors and getting alpha we have to it
0:14
word Linux console so for our terminal
0:18
users we have you know easiest method to
0:22
edit a file that it's a nano editor so
0:24
already we have created the false or
0:27
into the previous session that is fruits
0:28
and numbers now if I want to edit a file
0:31
for example the same file I'm going to
0:33
add it by using nano editor that is a
0:35
fruit now if I open a fruit file I can
0:38
find is that the fruit name which I have
0:40
I can add what are the fruit name I want
0:43
or if I want to rimoni food him I can
0:45
remove this as well and if I want to
0:54
save the file so for that we have what
0:57
the commands what what the he what he
1:00
generally will be able to use are
1:01
mentioned over here so this carrots and
1:05
carrot sign means ctrl ctrl + G to get
1:08
the help
1:09
ctrl + o to write out whatever the
1:12
changes you have done ctrl R to read of
1:15
control Y to check the previous page of
1:18
a file ctrl key to cut a particular text
1:23
ctrl C for cursor position so it will
1:27
show you the counselor position where
1:28
you are where it is right so it is
1:30
showing you line numbers and firm number
1:32
and which character we are using looking
1:35
on same thing you have control set
1:39
control X for exit control g4 justify
1:44
come control W check for something like
1:47
if I want to check for something like
1:51
one mango so I can just add it it will
1:55
directly take my cursor on that
1:56
particular word same thing we can also
1:59
go for the next page by using control V
2:01
and controlled you we can use for uncut
2:05
so for example I have cut something over
2:07
here so if I want one cut it or undo it
2:10
so I'll be using control you so it is a
2:12
small case
2:13
you do not have to use the capital so
2:16
same thing to check for the spellings
2:18
you have control T so we can check the
2:21
spellings and you know errors if you
2:22
have so if suppose you have and run into
2:24
any of your you know text so for example
2:30
this word I'm reading in such a way and
2:32
again I'm going to check it it will show
2:34
me this is not the word which you have
2:37
written so if you want to accept that
2:39
this is this this word so you can go for
2:42
accept if you want to insert it you can
2:44
insert and cap yes as you can use for
2:48
system here you can use for quit and
2:50
it's for e for exit so I want to accept
2:55
it so I'm going to accept the same by
2:57
using key e thanks wait I have accepted
3:01
done its make of fold now if suppose
3:03
again I want to check it and I want that
3:05
this should be inserted so I'll be using
3:08
I so it will insert the C alright so
3:13
this is what exactly generally we have
3:15
into the air or shakings
3:16
and you know the Spanish I think
3:18
generally which we have right so now if
3:23
I want to save of first of all I have to
3:25
write it the changes so for that I'll
3:27
use ctrl o for write out so it will ask
3:30
me whether you want to save the changes
3:32
will same file or you want to save as
3:35
and with a different name so you can
3:37
also say that with a different name with
3:39
fruits one so the file my original file
3:43
fruit will be as it is and it will
3:45
create a new file with the name fruit
3:47
one so it will a save as copy of the
3:49
file just hit enter and now it's asking
3:52
you whether you want to save with a
3:54
different name I am going to use yes so
3:57
automatically it is saved with a
3:58
different name and you can see the name
4:00
is being changed over here that is fruit
4:02
to one and for moving out of here
4:05
I'll use ctrl X so now let us check what
4:09
the references we have into the file
4:11
fruit and fruits one second safely what
4:19
are the changes I have made there I have
4:21
you know create let's say this coffee if
4:23
I do not want to make the changes and
4:25
sorry I want
4:27
keep the changes in the same file just I
4:30
will be hitting Enter over here so I
4:32
won't through it any save as copy like
4:35
way nano fruits one aisle studied this
4:40
well add something into the file like
4:44
this is a detail but I want to make the
4:50
changes into the same file I'll press
4:51
ctrl o and hit enter so automatically
4:54
this file will be saved into the same
4:58
content what we have added now let us
5:00
quit out of here and check we have only
5:03
two files of the same fruits you can
5:05
also check in such a way like F and s
5:08
right so it will show me the fruits and
5:10
fruits one so let us check with fruits
5:14
let us check with your fruits one right
5:19
so this line has been added so this is
5:22
how generally we can use here Nano
5:25
editor to edit of
5:26
simplest way how we can edit the file
5:29
but there are a more option we do not
5:31
have like if I am going to search for a
5:33
particular word and if I want to search
5:35
for number of times I cannot go for it
5:37
it's correct so there are many
5:39
disadvantage of using and making of the
5:41
Nano editors if I want to copy multiple
5:43
lines at a time I cannot do it so for
5:46
that we have some advanced tools which
5:48
we are going to see in the next video
#Programming