hi guys welcome back to my channel my
name is Ino so in today's video I'll be
talking about a tool called zip
so this is a tool for doing a file
compression or for archiving files
now the tool is available in uh both uh
Unix or Linux as well as on Windows
you can use the tool to reduce the file
sizes for for the purpose of
transferring on the network
or for the purpose of storing so that
way you can save on your disk space
and if you're transferring between
between two devices or between two
servers
and you're trying to limit the um the
usage of a bandwidth you can use this to
reduce the size of the file before you
send it
Okay so
right here I have um I mean the terminal
of uh cover Linux machine
and this is the command the zip command
and here you put your option then the
zip zip file name and then the file
you're actually zipping so before I run
this command
I'm gonna have to set up
uh
file and a directory that I'll use as a
test
for this uh demonstration
so first let's just do LS
see what folders and files you have in
here
what I'll do is I'll make a directory
using the MK dir command
and I'll call it test dll
then I'll change to that directory
using CD
then once a minute I'll do LS and just
as you can see there is no file in here
I'll use the touch command to create a
new file I'll call it test file
and then we do LS again
and this one has zero bytes that's the
size
so we can really demonstrate because we
want to see
the file being reduced when we use the
command to compress it
what I'll do is I'll copy
from one of the log files
so I'll do CP
now this file is in the
the bar folder
in The Root Drive and it's called
messages
and I'll copy this to the test file
says donations denied so I have to use
sudo here
I'll say sudo
it's asking for the password
and now I have a run the ls command
again
we have the file here and the size has
actually increased from zero to about
133 000 bytes
so this is what it this is the file size
before and now
after copying that
log file we have a much bigger size
now I'll go ahead and compress this file
using the zip command or the zip2
so it's gonna be zip then the new the
compressed file will be
test file dot zip
and we are zipping test file
now we run the ls command again
and this is this our zip file
and the size has reduced to about 22 000
bytes so you can see how it has actually
reduce it by quite a bit
the next thing I'll do here is to show
the command for unzipping a file
now before I unzip this file because
once it's unzipped it's going to call
the file test file I'll delete this test
file first
so let's say remove test file
LS so this one is gone now we'll unzip
the zip file
yes unzip then
this file
man list again
and that file is back the same file size
as it had before
so this is the same file the same size
so that's pretty much it that's how you
zip and unzip a file
um using the zip command
I hope this information has been useful
I'll see you on my next video thanks bye