all right. Hello, and welcome to command line Basics. This module is going over navigating directories. My name's Christopher Heller, and let's begin.
So for this video, we're gonna learn how to change directories. Understand how to change drives inside of the command line, used the tree command, learn about that and make new directories from within the command line.
All right, Pre assessment. What command can be used to make a new directory? Is it a new dear
M Kader or di Dir Tech, Tech new.
And we're going to make a new directory.
The answer is C. M. Kader for make directory.
Ah, the new dirt command is not a real command.
The Make Directory Command spelled out that while yes, see is
the shortened version of make directory. The full spelled out make directory is not a real command and dirt dash dash new is not a command to create a new directory.
All right, so changing directories is something you are going to do very frequently from the command line. And it's a very important, uh, skill. You need to understand that when you can move through the directories like you would with a gooey and how you're clicking through a folder, going through different levels
and, you know, copying, pasting from different techniques that we've learned in this course as well.
So in order to change directory, you're going to use C. D. And this is the same command that is in Lenox and Windows. And these have the same kind of basic concepts behind him. To where if he do seedy space dot dot that will go up a directory.
And if you use on Windows, if youse cd
forward slash d and then put in a new drive, it will help you change which drive you are on and which drive you're looking through from the command line.
And that's for Windows only. Because that's the way that Window's likes to, uh, you know, manage those kind of drives from that perspective where Lennox has the root of the file system and there's no need to change drives.
So let me give you a quick demonstration.
All right, so I have my command prompt. Open, as you can see, right now, I'm at the sea users and then my user folder right now.
So I'm gonna do dare to see what is inside my user folder,
and I have a whole bunch of different folders inside of there.
So when I want to do is I want to get into my
ah desktop folder. So I'm gonna do CD
and first have fur on a complete.
All right, now, I am in my desktop folder. I'm going to type D I r again
enter and look at all these files I have on my desktop.
And now I can go ahead and I'm going to go into my resource is folder I have They're so CD R E s tab
enter, and then D i r again to see what is inside of this folder.
And I have another folder inside of there. The Frankenstein I got to text files as well. So, uh, now let's say I want to go up a folder, go back to my desktop because I really wanted to go into my documents folder so you can do C d space dot Not and this brings me back up a directory to my desktop.
Now, you can also put that together, huh?
directory levels. So it's a CD dot DOT backs lash dot dot
I won't go up to directory levels. See how I skipped past
the my user folder and my desktop folder and went directly into this user shoulder.
So that is a useful way to go up.
Or you can just type in the folder directly. So if I do change directory and then go straight to the root of the C drive brings me right there.
Now, if I want to change my directory and get to my d Dr Gonna do seedy space forward slash d
backslash and he ran D i r. And this is inside of my i d Dr.
So that's how you're moving around inside of folders inside of directories, changing directories. It's a very important concept that you need to be very comfortable with.
All right, so we also have the tree command with the tree commandos. Is it graphically displays, folder and file structure from the command line. And I already know what you're thinking.
Ah, you told me that the gooey was graphical only. And the command line is not graphical. It all true. You will see. I will show you a demonstration of the tree command and you will understand how it is graphical in nature inside of the command line. All right, so you can also do tree slash f
and that will show all the files that are in the structure as well.
And, ah, just like we can do with the text files, we can pipe it into Maur. If the listing is too long that way, we can go through line by line and see exactly what's going through.
And then, uh, I will show you on Lennox as well. All right, so let's do
and look at that. I have all sorts of things in my d drive here, and that was way too fast for me. So I'm going to do tree
and look at all those files that I have as well.
Wow, that's too much. I'm going to interrupt that. All right,
And let's put that into more.
And now I can take my time
and go through all of these folders.
All right, so that is how you can use the tree command. Let me pull up my
Lennox machine and we'll try that. So we have a tree
and the show's a graphical representation from the Lenox. Uh, as well. So let me go up
another few and tree, and we could see a whole bunch of good stuff
and same thing with windows were tree. Excuse me and then more,
and we can go through. We take our time looking through this folder structure to help us understand what we're looking at from the command line. Now, if you're using a Lennox Mint destro, I know that what I had to do is I had to use Theseus. Ooh, after
installed tree command And what, we'll go over the suit of command in the APP get aft, and saul commands at a later time in this course.
But, ah, what that does is ah, since the tree command is not natively installed in Lenox Mint, uh, it will download and install the tree command so that you can use it.
All right, making directories. M. Kader that creates a new directory and MD that can also create a directory. So let's take a look at Matt.
All right, so I'm want to make a new directory on my d drive here, So I'm gonna do and Kader
Let's see. Where is it? Ah, here it is.
New folder. That's her folder.
And just like for the delete and erase commands, there is tthe e m d alias for Victor for Windows.
All right, post assessment.
What is the tree command used for? Is it eight or creating a folders? Be to read files, see to search their files or D d graphically display folder structure.
And the answer is D to graphically display folder structure. So, uh, it is treat does not create in folders. That is for the make directory, command or maker.
It does not read files that is tthe e type or the more command that we've covered,
and it does not search their files. That is the fine command.
All right, So in this video, we learned how to change directories, understood how to change drives,
used the tree command and made new directors. I hope to see you in the next video.