and now in this video we will start with
the
most basic command that is unzip command
okay
so uh first how we will start uh i will
create a one directory
that is uh sorry mkdir zip
and i will move into that particular
directory and i will create some files
one dot txt
uh so sorry two dot txt
three dot txt okay now these three files
has been created now what i like to do i
want to zip
all these three files in
one particular
zip file okay
so
1.2 xt 2.txt
3.txt and i want to zip all these in a
single file that is
file start sip
okay
all has been added i will do ls here you
can see files.zip and uh for your
reference i will open up this directory
and here you can see all these files and
the files are there in the tag in this
directory so now in this particular we
are going to study about
unchip how you can unzip these
particular files and particular zip
files okay so the most basic and
simple uh
like
command that is unzip we used to like
extract files of this particular zip
file
so how we can do it we will just use
unzip and the particular file name
sorry
and here you can see it is asking me for
do you want to replace or not okay so i
will just hit ctrl c right now
okay
uh because i don't want to create any
confusion for you guys first what i will
do i will just create all uh remove all
these one dot txt or dot txt and three
dot txt files i have now deleted all
these files
now what now i will use unzip and the
files dot zip and it will simply like
extract all the files which are present
in this file.chip for your reference let
me open it
so you can see
what are the files is present so here
you can see these are the three files
which are present in this particular
zip file so i will hit this command
and done we you have simply extracted
all the files of that particular filezip
file okay
so this is a very simple way to extract
files
and now moving forward uh suppose like
you want to use these files and these
1.2.3.txt in some kind of another
locations uh suppose in many cases you
want to store these files in some other
directories okay
so uh how you can do it uh
without like
extracting all these files in the same
directory in which your files are chip
so but you can extract this file in some
other directories also so how you can do
it this is very simple now what i will
do uh i will open up a new terminal
or okay let me open up a new terminal
let me increase a little bit of font
size for you and
i will create
one for that extracted files
okay
i'll move into this folder and i will
copy the whole path that is home i use
extracted files
okay
in
this terminal you can copy by ctrl shift
c
okay i will just move it to here
now what uh if you want to like unzip
the files in some particular directory
so for this we use basically hyphen d
option okay in this we will provide the
path of that particular
particular directory where you want to
store that particular uh extracted files
so unzip and then the file name which
you want that is files.chip and hyphen d
and then ctrl shift v and here we want
our
files in this extracted files directory
okay
now what we we will do here i will do
just a list in this particular terminal
and here you can see all of these files
has been
like uh extracted in this particular
directory so in this way also like you
can store your
instructor files in some kind of another
directory okay so this is another simple
trick
like which
you should know about it
and also there are many options like uh
suppose in case what happens you have
extracted your files uh
zip file already but sometimes also what
happens
you accidentally click on it so in this
case in linux what happens when you try
to like unzip files and in the same
directory or you can say in
another
so here you can see we have already
these files one two three dot txt what
what where what will happen when i will
try to hit the same command again so it
will ask me for do you want to override
these files or none or nothing or else
okay i said uh i will say yes okay
and again it is asking for 1.2 xt again
i will say yes again for two dot txt and
three dot text okay yes
so again these all the files has been
replaced
okay in case if i
would made any changes in this well then
i will definitely choose no because
i don't want to create any kind of
problem for myself okay
so uh like this is the basic uh options
which we can use to unzip files and also
uh like you should know about one more
option that is uh
hyphen queue option what is it okay
i will show you by uh first what i will
do i will remove the all these one dot
and all these files from this directory
okay
so here you can see there's all the
files draw chip what basically in simple
case what happens when i do
it will show me these messages okay
extracting these files extracting to
text extracting 0.txt
uh in some cases we don't want these
kind of information because we know it
will simply extract the files so for
this what we can use we can do just uh
hyphen q option
iphone queue and then
file store zip it will uh just avoid
like it will not print any kind of extra
things
so uh
for
before hitting this command
i'll try to again remove all those files
and now
i will use
hyphen key option
and done
so in this case we didn't get any kind
of
information or any kind of messes like
whether this file has been extracted or
not okay now again let me remove it and
i will again tell you one more option
that is hyphen l option basically if you
are aware of ls command so you will
definitely know about either ls iphone
option
which basically like list all the
uh
means list the files in a long format
okay you can say like we get many kind
of things like date time user guest
not guest uh groups user groups
access time modify time we get all those
kind of information and simply uh you
can say permissions also like we will
have a separate lecture on permissions
okay
so now what we can do unzip hyphen l and
again i will try to unzip these files
uh it is looking so much like
so much stuff other let me clear first
in screen now again i will write ng by
funnel and then file store zip and here
you can see the
more extra information about the
extracted files
you can see the length the length is
zero
and
date time name all these things all
these things okay
so it basically doesn't extract but it
simply shows you the whatever the files
are present in the particular
uh
zip file so okay
so that's it for today