In a previous lectures we have learned how to create new files in terminal.
What is also good to know is how to remove them.
So if I open terminal and list output of current directory I can see here a file article.
Let's say I want to remove it.
So just die are and followed by path to file.
I want to remove in my case it is enough to use just name of a file called article as currently I am
inside.
Directory where the file was located.
Now I will show you how to remove the let's say file.
Sorry does BATF using absolute path just type r m followed by the absolute file.
In my case it is home.
Richard sorry dot BDA
and again in file explorer on the left side I see that file was truly removed.
Good.
But now let's delete some folder for 4 dead.
I will create a new folder called needed me
and now I can dive in terminal
r m needed me but I have some error message cannot remove delete me is a directory.
In such cases I can use command I am there which will remove empty folder so item data is for removing
folder but only empty folders.
Here is also good to mention that I am command can remove also directories but we need to some parameter.
Firstly create again folder called delete me
and try again I am.
Come on.
You'll see that we have no success and one node here.
If you are doing cooperation with folders it doesn't matter if there is slash after its name or not.
Usually if you type first letters of folders name and put top keyboard it will fill the whole name with
slash at the end.
So let's check manual.
And here I see that by me there are remove directories and their contents recursively.
So let's test it
are m with parameter R needed me
and it is removed.
Well done.
We can also reach it in terminal using ask on that.
The father did it to me was really deleted.