Hello everyone and welcome back to this lecture.
Now in this trial we'll be covering some of the basically Nick's comments and in order for you to get
to know Linux better.
The good way would be to start off with learning these basic commands that I will teach you right now.
So to start off we just want to open up our terminal which is this icon right here.
So just click on it.
It should open up this terminal.
And if you want to you can enlarge it a little bit so you can see things better right here from this
box right here will be running all our programs.
Most of our programs and we will be running all of the other comments so you better get used to this
as we will be doing most of our work from here.
So the first comment I want to show you is be WD which stands for print working directory.
So it basically just prints out the current directory that you are in which for in my case is slash
root.
Now if we want to change the rectory we would firstly need to know what sub directories are in slash
root in order to list all the files and all the sub directories in slash root.
We can just type here L S which will show us all of the current sub directories that are located in
the slash root directory as we can see we have desktop documents downloads music pictures public and
many more by many more I'm into more.
So if you for example wanted to list all of the files that are in the slash through directory you would
use it which you would do it with Alice.
What else minus file a comment.
What this does is basically it will print out same day.
Also these sub directories but it will also print out the hidden files and hidden sub directories and
we can see right here it's printed out more files than this command right here.
So as you can see all of these files and start with DOT are not being seen in the Alice comment.
So if you want to give to take a wide view on all of the current files into this slash root directory
you can do it with Alice minus a leg comment.
Now also one important comment is to clear screen so you don't see all of this all the time.
You can do it with a simple command which basically just as it says just clears.
So type here clear.
And it should remove all of the commands that we ran previously and it should give us a new and freshly
opened terminal for example let's say you wanted to go to the desktop directory which is up directory
of slash route.
You can do that with a simple two letter command which is basically just see the desktop.
This C.D. stands for a change directory and it will basically just put us in the desktop directory right
now.
As you can see right here the terminal is now located in the slash desktop directory.
If we type here the p WD once again it will show us that now our current directory is slash root slash
desktop.
Now let's say for example you wanted to create a file in the desktop directory.
You can do that in with the simple command which is touch and let's say file want the file that the
stay for example.
And now if we type here our S which will list all the files in this directory it will just print out
the file that the axes we created that file text the.
The extent with this command right here.
So basically touch command create files and the let's say right now we for example wanted to remove
this file.
Now how do we remove the file we remove it with also a two letter command which is just our plan stands
for remote.
So we just type here remove file dot DSD and if we type you Alice once again which will list all the
parts in the directory we'll see nothing because the only file that was there was the file that we previously
created and then after deleted it.
So let's cover that once again.
We are currently in the slash through slash desktop directory and if we want to create the file we basically
type touch files of the estate.
Now this doesn't have to be filed that Steve can be anything.
That's the key.
It can just basically be anything.
So for example it doesn't even have to be dot the exceed so much anything.
And if we type unless once again we can see there is a file called anything.
So let's do again let's remove it.
We type here are anything.
And if we type unless one.
So again it won't be there anymore.
Now we covered how to make files right now.
But let's say we for example wanted to create a sub directory in this nested directory so to make a
directory which is basically just a folder you want to type the command and K here which stands for.
Make the rectory and then type here the directory name you want to make.
So for example let's say we want to make directory called Kelly it will and let's say we list right
here.
The current test the directory.
It will have a sub directory called Kelly that we just created.
Now you might notice that the sub directories are different color than the basic file so let's make
our file one again file one sixty.
And let's list again you can see that the file one that the T is white while the sub the rectory is
blue.
So files will be different color than sub directories you should know that.
Well it's not that important but you will get used to it in time so let's delete the file once again
with the R.M. comment.
Now to delete the sub directory you want to use the same crime comment which is file one which is on
the Mark Kelly but you will notice that if we wanted to leave it there Kelly it will says cannot remove
Kelly is a directory.
Now in order for us to delete the directory we need to add a minus r at the end of comment to just type
here again.
KELLY And just add here minus r and as you can see the command work properly and is free type S again
it won't be there there is no Kelly directory anymore so let's clear our screen with the clear command.
And right now I just want to tell you before I cut this editorial right here that the comment R N minus
r is very dangerous.
Now you might be asking why.
Well basically I'll show you why.
For example.
Let's create a directory called filed for example.
Here we can see with the allies command it's right there and we want to change our current directory
into the file directory.
We do it like this and you can see that our current path right now is slash desktop slash file where
in the directory that we previously created.
So now let's say that we create three files right here file one such file to touch file three and if
we type Ellis here we can see that right now we have three files right here.
Now why is the arm mind the Sarah comments so dangerous.
Well if you're a root account and you just type here are a minus are part of me if you yes R.M. you
will notice that the R.M. the star and then minus your comment deleted everything.
So now you might be wondering so what which is deleted all three files in one command which basically
this star right here is referring to all the files in the sub directorate.
So if you type your disk command which is R.M. star minus r it will delete all of the files in the current
directory.
So as you can see we don't have any file left.
Now the reason this is so dangerous is because if we go to the root directory and type the same command
our REM star minus r it will basically delete all the files on the Linux system which will make your
this machine crash and not work anymore.
Now I'm not sure if they updated it and if it is for some permissions or not permissions but confirmation
in order to run this comment but we will not tested right here because you will be deleting all of the
files all of the files in this system so for this part want to drill that would be it will cover other
comments in the tutorial with the basic Linux commands and I hope I see you there by.