Next, listen, we have Compressing and Uncompress Singh files, there are few different commands that
we use to compress and compress files, but first of all, there is a command that is used commonly
in Linux and that command is called Htar.
What does thaat do with all taht takes a bunch of files together and put it in one container or one
file you could say is just like in windows.
You have a bunch of files and you zip them together.
So most likely the tar files does not compress as much as the actual G zip command.
The GS it is the command is actually compresses a file and then there is a command GCIB minus D or Gansett.
These two commands are used to Uncompress a file.
So we will try all these commands in our Linux environment one by one.
And this way you will understand how these commands work.
All right.
I am in my home directory and someone has asked me that.
Send me all your contents of your home directory.
So in my home directory I have directories and files and maybe links and directories.
Subdirectories and within Subdirectories there are more directories.
So how do you put everything in?
One is we use a command tor and the option that I use is C the F, then I would have to specify the
name of the file that everything will come into.
So I'll just put myself because this is my home directory.
I'll just put I have absol, I'll just put tarde the NY because this will identify that this is a tar
file and what are, what am I tiering.
I'm tarring this entire directory so I could do home.
I have sol this filter, everything in that or I could simply do that relative path which is dot dot
means tar everything or put everything that you see right now into a file called I absol data and I
run it.
You see all that messages come up on the screen.
Some of the messages that you will see Tor file is archive, not dump.
Forget that, don't worry about it because it's trying to tar itself.
That's where you are getting the message.
But anyway, when you get all that message, when you run this mysel tr and you will see right here
I saw Tor perfect.
Yes.
So now everything, all the contents, desktop templates, public, all these files and pictures I have
are all put in into this.
File, how am I going to untie it?
Well, I don't want to enter it in the same direction with all the files already exist.
So what I will do, I will create a directory mkdir and I'll call it blah, blah, blah, whatever.
OK, the file, the deck is created.
I'm going to move this I absol detat file into block directory.
It's moved.
Yes it is moves.
I don't see it.
I will go into billi directory now.
I'm in blah directory.
Just make sure to run PWP.
Yes home.
I was a block perfect.
Is the file there.
Yes it is there.
Now how do Ontari meaning taking out all the contents from this file and putting in display directory.
There's a command to the same thing but this time I would want x the F to extract everything.
And this is the name of this file.
I'll run it hit enter l come through all these untiring files.
And now when I do remember who I am and home I have Zogu blah.
And now when I do this myself here, what should I see.
Well, I should see the exact same contents I have in my home, I have I should see the same contents
here, if that's confirmed, Bengoa.
Yes, I do see everything right.
Perfect.
So I don't want all those contents in there.
I'll go one step back and I'll do it myself here again here.
And you'll see I have the same thing here.
Why do I need to keep two copies?
But of course was just a matter of explaining you.
So let's go back into blup and this time you'll see I have this file I absol detat which has everything.
No, the size of it is 272 five eight eight eight zero, but it's huge.
I want to compress it.
So that's compressive.
A Guiseppe grip.
I have Södertälje.
Simple is that hit enter.
You see, it took a little longer, but it did compress it.
Just look at the size right here.
Remember the size to seven two five eight eight zero.
Let's do it myself.
Here you see the file size went down eight zero one eight to nine eight.
It means it has.
How many digits to.
Four, six, seven, this one has two, four, six and eight, so of course, this one was the size
was a lot huge it then this one.
So it means it is compressed.
Then the next commander you have is Jesus minus D or guns zipp, what this does is basically uncompress
it to do uncompress you do G zip minus D or again Gunzinger which is right here g zip or gun zip.
I'll just use zip and I absol dottore hit enter.
Now, the files I should come back to, the same one we have right here, this is the original file
size, I remember.
And yes, we did get original file size.
So we have to file the cheeseboard we compressed it.
We Uncompress, it will go back to our home directory and we do have this blat directory and we'll simply
get rid of this blah directory, which is remove mines are for removing directory or RMI are to remove
it, but that is not empty.
So what we'll do will do minus F to force it.
I think my arm Diyar myself does not work here, so I'll do R minus r f this definitely work.
Yes it does.
It's gone.
Directress gone.
So this is how the tar is explained in simple words.
The purpose of these commands is if you and if you have to transfer files from one computer to another
or to send it to someone, the file sizes are huge and the transfer will take a lot longer.
And that is why we put them together into tar and compress it so it becomes smaller and smaller and
the transfer becomes easier.
Hype in this lesson, we are going to cover FTP, which stands for file transfer protocol, the FTP
is a standard network protocol used for the transfer of computer files between a client and a server
on a computer network.
ATP is built on a client server model architecture using separate control and data connection between
the client and the server.
This is the definition that I have.
I have actually got it from exactly from Wikipedia in a very simple words.
And FTP is a protocol that is used to transfer a file from server A to server B now that the protocol
is actually a set of rules used by computers to communicate so that that protocol that tells a computer,
hey, this is how it should be transferred, this is the port that you should use this as an encryption
that you should use.
These are all defined rules that are already built in between a computer, an operating system for the
FTP.
The default outpoured is 21, just like for SSA.
We have 22 for DNS, we have 53 and for many other services that we run in Linux for FTP, the USB Port
21 to communicate from one server to another.
Now for this lecture, we need to Linux machines.
If you do not have to Linux machine, I would recommend you that you should go ahead and build another
Linux machine, which could be exactly the same one as you had previously.
So my first machine that I've been using is my first Linux VM.
This is a hostname and the second machine that I created and I'm referring it to as the hostname as
Linux.
S.O.S seven is just a word.
It's just a name that I picked.
So anyway, I'm sure you already have my first Linux, VM, S.O.S, VM and what you need to do is to
install another Linux.
William So to put in a graphical way, let's go into detail.
So we have a client, a server that needs to send a file to another server, let's call it.
It's over A and server B, and whenever you have one server trying to connect to another server, that
recipient becomes a server and the sender becomes a client.
So it wants to send a file or FTP protocol.
Now, if this recipient server, if it's not running any kind of listening service to receive that protocol,
then it's going to reject that that transfer.
So we need to make sure that it is running FTP D Deman or the service or the application on that server.
And by default, whenever we run it, it will start up that service point twenty one.
All right.
Now what is the process to actually configure that on clean and sober?
So let's look at the server side first.
So here are the quick steps that will cover to do the installation configuration of FTP on the remote
server.
After becoming a Ruleville check of the has FTP server install will check if you have Internet connectivity,
will install the V as ftp D package on the server and then we'll modify the VTS ftp configuration file
and in that file will make certain configuration changes and these changes are here listed and we'll
go over them one by one and then we'll start.
The service will enable the server so it could start a boot time.
We'll stop the firewall D so the communication can take place between server eight and server B if you
wanted to leave your firewall the up and running, then you have to add a rule for it to allow to accept
port or traffic 21.
So I traffic on Port 21.
You can find that online.
How to add FTP port on the firewall and then you could disable the firewall D if you're not using it
just disable so it won't start back online.
And the last step is of course make sure you create a user account on that FTP server if you do not
already have it, because that's, that's, that's how we will use to transfer files from sorry to silverbeet.
And the last part would be we will install FTP client on the client server will become rude, yum,
install FTP, become a regular user and then we will create a file called Kuga.
Now this is just a regular file.
You could actually use any file name you like, you could pick pizza, pasta, whatever the filename.
But if you wanted to be consistent, staying within you just make a file called Kruger.
Once with file is created then we'll ftp to the server will enter our credentials.
We'll put an API for binary and then hash for hash tagging that so you could see the progress.
And we'll use a comment put Kuga, what's this trash for then we simply type it by to get out of that
FTP process.
All right, so now let me go back to the installation process of FTP on the server.
All right.
As I said before that I have a client, which is my first and which is the very first Linux VM that
I created.
And I called it my first Linux VM.
And then I have another machine that I'm using for this lecture purpose.
And then that that machine I'm calling Linux S.O.S now in this machine, once you have it built and
configured, I want you to become root.
By the way, I was logged in as myself, so if I exit and I do, who am I?
You going to see that on this server?
I have already created an account.
I have Zol.
So if you do not have a camera during the installation, you can create a go ahead and create it if
you have it.
Good.
Now become rudek.
After becoming rude, of course, you could do, who am I just to confirm which users you are logged
in as now you need to install the DP Daemon or the FTP service on your machine before you install it.
Check if it has already been installed.
So I will recommend you type R.P.M. Dash Kuai and grab for V.
S FTP.
This is the name of the package that needs to be downloaded.
OK, it is not downloaded and it has not been installed, so I will run the command before I run the
command or before I go out on the S.O.S repository to install it, I wanted to make sure this machine
that I'm logged in right now has Internet access.
So I'll do simply paying a dub dub, dub dub, Google Dotcom.
And you see, I'm getting a response back perfect's.
It means I have Internet connectivity.
Now I will go ahead and do jume install the.
Now, Discman is going to the all the repositories and it is checking, hey, do you have a safety package
that I need to download and then install it?
Did it did go there.
It checked and it says, yes, I do have it.
And this is for architecture, 64 bit.
And the version that I have, the latest one is 3.0 to do you want to download?
And the size is 171.
Seventy one.
Yes, I do want to download.
So simply type Y and hit enter is saying downloading package and then is saying it has a fingerprinting,
some information, some security information.
Is it, is this OK that comes with a package.
That is fine.
Go ahead and click.
Yes.
Running a transaction check, running transaction test, it will go through the process of fetching
that package, downloading the package, installing the package and then verifying the installation,
and at the end, you say it is completed and verified.
Of course.
Now, if you run that same common R.P.M. Dash Kuai and grab for Vesp, you will see it will show up
the package that is installed.
There you go.
This is the package that installed.
So we confirmed that it has been downloaded and of course it is installed now.
We need to configure it.
So every time you hear the word configure it means we have to configure it on the configuration file.
The configuration file for FTP server is at CBS, ftp, PD slash we as FTP car file.
So before I modified, I always recommend that you make a copy of it.
So let's go to the EPD do ls minus l tr and you will see this is the file.
Now, I want you to go ahead and make a copy of that, so copy cpv soft-pedal kaf the EPD half Dorridge.
This is the name I usually pick to make a copy as it reads.
It's will tell me that this is the actual original file.
All right, the copy of the backup has been created now I need to modify the fall of EPD dot com fall,
and now I have to go through these parameters that I have listed on my slide to modify these parameters.
The first thing is find the following lines and make the changes as shown below.
Disable anonymous login.
So I will search for slash A and O and M sorry y m o u.
S Anonymous.
It took me to the first word because I'm doing a search within B it took me the first word.
But this is not the line that I'm looking for.
So I'm going to hit and to go to the next one.
And there is says anonymous underscore enable and it is.
Yes.
So go ahead and remove that.
And put no because you don't want anyone else to come into your FTP server as anonymous good next parameters
is a SASE I, a skuzzy I.
And now you have to uncommented these two lines.
Upload enabled, download enabled, that's perfectly fine now come down to where it says F.T. PD, search
for that.
And right there it says Footpads underscore Baner, welcome to BLAW FTP server.
That is fine.
And you could remove that.
Uncommented now, if you want to change to welcome to Bly FTP Server two, welcome to my beautiful FTP
server.
That is fine.
You could do that.
Now the last thing it says ad at the end of this file, if you wanted to go to the end of this file,
you have to shift it and it will take you to the end.
And here I'm just going to put first.
I'm going to put.
Comment.
As local.
Time and I'm going to put in their parameters, it says use underscore local time equal.
Yes.
Perfect that only these are the only configuration changes you have to make now go ahead and save the
file.
Perfect file is saved.
Now it's time to start the BSF TPD service, and for that we have to use the command system, CTL Starquest
PD.
It is started.
Let's check the status if it is actually status or not, yes, say started see active here, beautiful.
Now, I want to enable that.
So every time my system reboots, I don't have to go back and start that service manually again.
I want us service to start every time this system reboots.
And for that I have to use a command system, CTL space, enable WPT hit enter.
And it is our it has been enabled now.
Perfect.
Now I want to disable the firewall on the server to disable it.
I'll use the command before I disable.
I need to stop it to stop firewalled.
Now as I said earlier, if you do not want to disable Firewall D, which I don't recommend you disabling
it because this is my lab environment, so I'm OK.
So if you're in the production environment and you have firewall running, then you need to add the
rule to allow poor 21 to incur as an incoming traffic for that firewall.
Anyway, going back, let's stop the firewall because I'm using my lab and I really don't need that.
It is stopped now let's check the status.
See right here, it says inactive, dead, perfect.
Now I want you to disable it, meaning every time a computer reboot, I don't want this service to start
back again.
It is disabled, perfect, beautiful.
We did our work on the server side, and the last line you're going to see is his user ad i absol if
the user does not exist already.
I mean, I do exit out of the route and I do.
Who am I.
You see, I already have an account, my account.
I have Zoll on this machine so I don't need to recreate.
If you do not have the account or if you do not have an account that you will be using for the FTP purposes,
then I want you to go ahead and create an account anyway.
So this is the configuration we followed on the ATP sorry, on the FTP server.
Now we have to do a few things on the FTP client so the client needs to install FTP.
He.
The package and four to do that, let's go in to our client.
And my client is right here.
This is my first is the perfect now here if I become rude.
By the way, I was logged in, as I have, so now if I run FTP Command, you see it says Basche ftp
comen I found the reason it is not a phone because I do not have the FTP Clide installed, so I need
to install a now.
Of course, as I said, always check to make sure you have.
Internet connectivity and for that pink, any website that you like online and it says, I am getting
the response back, perfect.
Now I could go ahead and do some install FTP.
Now, this is not the VSV, this is FDP.
So we are installing the client part here, not the server package.
All right, so once you do jam install FTP, it will go online, check for the package and it says running
transaction check package.
This will be installed perfect.
This is what I want.
The version number so and so and the size has been 61.
K, that's perfect.
Go ahead.
Why.
OK, transaction tests succeeded, verifying it, installing it, verifying it and completed beautiful.
So now if you type FTP and just simply hit enter, you see it actually took that command and it brought
you into the FTP interactive session.
You don't want to use that right now.
Just click buy so you could get out and get your property.
Now I want you to become Afsal again.
You could do as you dashi afsal or of course in this case it's yourself, but or you could just simply
do exit and it will bring you back to your own user account, lifeSo or so.
If I do ask myself here, these are the directories and files I have right now in my.
A home directory.
So this is home directory.
OK, now I want to create a file called Touch Kruger.
It is created, if you do this myself here, you see it has zero bytes, and right here it says zero
bytes.
If you want to add something to it, let's say I will do this myself.
Hear me out.
I'll put that to Kruger.
Perfect, now, when you do assessment LTI, you see now it has a total of five hundred and seventeen
bites, if you do cat on Kruger, you're going to see basically the output of.
Exactly that's myself here anyway.
So I.
Why did I do that?
No reason.
I just wanted to have some information in that file.
You could have done V.I. and typed in something else like V.I. Kruger, like this is my file, blah,
blah.
Anyway, I just wanted to populate that file with some information so it won't be zero bytes now.
Right now it has five hundred and forty five bytes.
All right, beautiful.
Moving along now, we have the file.
Now, the question is, I wanted to transfer that Krueger file to the server.
And the server is the one where we installed that FTP package.
So in order to transfer the file over to the server, we need to know the IP address of that server.
So I'll go back into my server to send my server for the IP address.
I'll type if config.
And if I move up, you're going to see the IP address for ENPI zero, the signed one is 192, 161 58.
Got the IP address.
Now I'm going to do FTP 192 168 one.
DOT 58.
Hit enter.
Beautiful.
There you go.
Says, welcome to Blyer EFTPOS, ever see that blasted thing I told you if you wanted to put it like
beautiful here would show beautiful here.
OK, so anyway, it says name and IP address and user name is Ives.
Also by default, it picked the user name that I've been trying to ftp it over.
If you wanted to use a different user name than you will specify here, let's say you wanted to use
John or whatever, but I wanted to use my own name.
I was also I'm not going to enter anything.
I'm going to leave it as default and I'm going to go ahead and hit enter.
Please specify the password.
This is the password of your Absol account to that server or to that remote machine.
It says 230 large and successful remote system type is units using binary mode to transfer files.
Perfect.
Now, what I need to do, I want you to type by Orbin as switching to binary mode because you wanted
to transfer the file, always using FTP to the binary mode.
That is fine.
Then I want you to type hash hash, meaning when you are doing the transfer, show me the hash tags
which will show, which will tell me that there is a progress going on in hash tag progress.
Now time to put the file.
So whenever you and it's time to transfer you use the command put because you are going from A to B
and do Kruger.
Hit enter.
Right here, it says.
As soon as you hit put Kruger Local, Kruger and.
Entering passive mode 150, OK, to send data hashtag, remember, this is the progress, if it if it
was a huge file, you you would have seen so many hashtags, 226 transfer complete 545 bytes since this
is the size of the of my file 545.
This success, it succeeded.
Perfect.
Now you could just do by now you're back out to your machine.
Now do you want to confirm underserve has been transferred.
Of course, yes.
Let's go to the server.
I am in my home directory.
Investa ls minus l tr and you're going to see right here.
This is Kruger.
This is the file transfer.
Hello, and this lesson, we are going to cover SICP, which is secure copy protocol now the Secure
Copy Protocol, or ACP, helps to transfer computer files securely from a local host to a remote host.
It is somewhat similar to FTP, but it adds security and authentication.
So if you are transferring a file again from server A to server B, you could use as P as the protocol
of the command rather than FTP.
And the reason it is preferred is because it is secure.
It adds more security and authentication.
The protocol is a set of rules used by computers to communicate so and SICP was built.
They decided, OK, this is the protocol that SICP should use and this is the port that should be used
to transfer a file from one server to another.
The default SICP port is S.H. or Port 22, so there is no different protocol that was established or
set up for C.p.
So it actually leverages on to the same as the same protocol that we use to connect from one server
to another or S.H..
Now for this lecture again, we need a two Linux machines.
One is for the Cleide and one is for the server.
The client is where we have the file and the server is where we want to transfer that file to where
the client.
I have my Linux machine and it is called my first Linux VM for the server.
I have a server, which is exactly the same as client as well, but I named it Linux S.O.S seven.
So the process is SFP.
The process in the graphical way is that you have a CLIDE, A and B server.
Now Client A wants to copy a file over to server B now it will use the protocol SICP or the command
copy, but it actually transferred that over through the protocol we already have in place and that
is SASE.
So there is no new protocol for that.
It actually piggyback on S.H. And of course the SSA port is 22 and the servers for SSA Deman should
be running on the recipient or the remote server in order to accept any incoming incoming traffic.
OK, what's the process?
The S.P. command to transfer files to that are more server.
First of all, you have to log in yourself, then create a file.
Any file, let's say, in this in this lesson or in this Laville create a file called Jack.
Once the Jack File is created, then we will simply run the command SICP, the file name Jack.
I have Zoll is a user name that actually exists on their remote server at one I to 161 dot X is the
the actual IP of the remote server.
Of course we replace that xvid digit, that is the digit of your remote server and the last part is
calling the Egholm Zakayev.
So this is where you want the file to go to in this directory on the remote server.
Once it's connected then it's going to ask you to enter username and password and it will transfer the
file successfully.
Now, enough is enough.
Let's actually start our Linux machine, which I have already started and I have already logged into
my PUDI.
This is my Linux machine and I refer to as my client machine because this is the one that connects to
the server and this machine Hostname is my first Linux VM who is logged in.
Who am I?
I'm logged in as myself.
I followed the directions here.
I'm going to create a file called Jack in my home directory in my home directory slash home slash.
I have salt.
I'll go ahead and do touch Jack and I do X minus l tr you will see I have a file called Jack.
It has zero bytes now.
I want to transfer that, but before I translate, put something in there just to make sure it is transferred
with the right content.
So let's do V.I. on Jack and just put Jack.
As.
Jeri's.
My uncle.
That's it.
Do my sultana, you see, it has total by 22 perfect.
Now we need to transfer this file to our remote server, but before we transfer that file to the remote
server, we wanted to know what is the IP address of their remote server.
So I'm going to go into my remote server, which I also have it opened and I'm going to do if config
ENP zero as three, because that's the interface where the IP is assigned and the IP is one eight two
one sixty eight one dot fifty eight.
Beautiful.
Let's go back to my client and now this time I'm going to run the command.
That's clear the screen so you could see it better now run the command SICP, the name of the file which
is Jack, the name of the user who is going to log in to the remote server.
What is a remote server?
192 to 168.
One dot 58.
Yes.
And then Colen slash.
Where is it going to or which directory it's going to?
I hit enter and it's going to ask you for the password.
If you are doing SICP for the first time, then it's going to ask you for the fingerprints where you
have to type in.
Yes.
And then enter the password.
So go ahead and password.
And it says a jack, which is a file name.
One person transferred and the size was twenty two and this is the time it took to transfer.
OK, I got this message on the line, but let's confirm on the server whether it was transferred or
not.
So first of all, it was transferred as I have Zolt so I have to log in as I have Zoll.
So who am I.
I am I have sold beautiful now which directory am I logged into?
I am in my home directory because that's where I transferred the file.
Right now I will do this minus LTA to check if that Jack came in.
It did.
Perfect.
Now, is this the right file that came in last catted?
We did the cat, Jack, is Gerry's uncle perfect?
This is how the SICP works and you could also do the same thing, by the way, SICP to go into this,
a remote server.
If you wanted to pull something out of that server from server to the client and you just have to reverse
the command.
Anyway, try it out.
And these are the couple of commands, a few commands that I wanted to cover and very important commands
when you are dealing with transferring files from one server to another.