Linux - GREP
Show More Show Less View Video Transcript
0:00
now here we are going to talk about the
0:02
grep grep is called as a global regular
0:05
expressions or sometimes they are also
0:07
called as a general regular expressions
0:08
means all the particular expressions we
0:11
can use to find out anything
0:13
globally or anything into the Linux
0:15
operating system so wherever the file is
0:17
located wherever the text is located we
0:20
can find by just using the crap command
0:22
so grep command is generally globally
0:24
search for your Liguori expressions
0:26
generally you have grep command is used
0:29
to search a particular text completely
0:32
into the Linux operating system or you
0:35
can search the given file from the lines
0:38
contained we just matching to your
0:39
strengths or words for example now if I
0:42
want to search for a particular string
0:44
into my file I can also using the grep
0:47
command grep command can also be used
0:50
for searching for a file starting with
0:52
particular world for example I want to
0:54
check all the particular file which is
0:56
started with test named test1 test2
0:59
test3 any particular file which has
1:01
started with a test name I can also get
1:03
it to the search by using by grep
1:06
command so syntax of using the kreb
1:09
command is grep and the options we can
1:12
define there are several options we have
1:14
which we can check by using the man
1:15
pages then the pattern what exactly we
1:18
are going to search for into a file that
1:22
we can add by using the corrupt command
1:24
so grep is just a search command where
1:27
you can search this particular text or a
1:29
file globally into the Linux operating
1:31
system
1:32
so this is what the corpus let us see
1:34
how we can use this grep command into
1:37
our Linux console so we can check for
1:40
the files which we have as we are going
1:42
to use the corrupt c'mon I should have
1:45
one of the file which contains the names
1:47
bits fruit okay so I'm going to talk at
1:50
this file and I want to check for
1:53
whether we have Apple in this file
2:02
let showing you I have Apple written
2:06
three times under the file so it is
2:07
finding be you know content notify right
2:11
same way if I want to check for any
2:13
particular package or any particular
2:16
package which I have installed so
2:18
generally the command is for rpm and -
2:24
me
2:28
I'll use pipe sign crap or I can also
2:33
use query all that is QA and corrupt and
2:38
I can find out the package name and so
2:39
if suppose the package name is related
2:42
to something like
2:44
edifis
2:47
so I can check it will show you all the
2:49
packages which are having the NFS into
2:51
it right same way if I want to check for
2:55
the particular package which contains
3:00
mmm any particular file for example I
3:04
want to to checked in Crypt and any of
3:09
the fall like my fruit fall so I can
3:11
check for it so there is no crypts but
3:14
if I want to check whether it is
3:15
containing anybody could afford name but
3:18
sherry so it will show me the cherry the
3:21
same way generally search for a
3:23
particular ward into a directory like
3:25
also you have seen like when I have used
3:27
the corrupt PSE come on right that time
3:31
it will show you all the particular
3:33
processes but if I want to charge for a
3:35
particular process now for example I
3:37
want to search for a particular process
3:38
like for batch processes so I can just
3:42
sort - into the file then show see this
3:46
is the file which contains the patch so
3:49
generally grep was a tool which and
3:51
really we use for finding for something
3:53
so grab can be used anywhere you know
3:56
for finding the packages for you know
3:58
filtering a particular process and
3:59
giving you the output which process it
4:02
contain buried contain what the content
4:04
you have added in your file you can also
4:05
search from the file itself you know you
4:09
do not have to move into the file just
4:10
where the list is there for the file you
4:12
can check for thee and the name of the
4:14
file or T word which we have written
4:16
identify this is what the crap is and
4:18
how it generally works you have many
4:21
parameters even for the crap you can
4:22
check by using man crap so you have many
4:27
parameters many options for looking at
4:30
the crap you can also check for the line
4:32
numbers you can also check for the you
4:34
know different colors different many
4:37
things right so you can check for all
4:39
the parameters of the crap so basically
4:41
it is used for finding purpose you can
4:43
find and you know filter your data from
4:46
a particular file or overall from the
4:48
file systems so this is what the crap is
4:51
this is how generally we use the crap in
4:53
your next video we are going to talk
4:54
about how we are going to find a file so
4:57
here we are searching for a word but
4:59
well how we are going to file the fine
5:02
and files which we have located
5:05
somewhere and if I forgot where I have
5:06
saved my file so for that keep watching
5:09
the next video
#Programming
#Software

