All right. Hello and welcome to
command line BASIX.
This module is going over
navigating directories.
My name is Christopher Haler and
let's begin.
So for this video, we're
going to learn how to change
directories, understand how to
change drives inside of
the command line,
using the tree command, learn about
that and make new directories
from within the command line.
Assessment, what command can be
used to make a new director?
Is it a new order,
B make directory,
C mkdir
or D Dir tech
tech new and
we are going to make a new
directory.
The answer is C mkdir
four make directory
the new dure command is not
a real command.
The Make Directory Command spelled
out that while
yes C is
the shortened version of
make directory, the full
spelled out make directory is not
a real command and dir
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
skill. You need to understand
that where you can move through the
directories like you would with the
GUI and how you're clicking through
a folder, going through different
levels and 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 Linux and Windows,
and these have the same kind of
basic concepts behind them
to where if you do cede
space, dot, dot,
that will go up a directory.
And if you use on
windows, if you use code
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 Windows likes to
manage those kind of drives.
From that perspective where Linux
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 C users
and then my user folder right now.
So I'm going to do DÃ¼rer 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
desktop folder.
So I'm going to do CD
desk and first time
for autocomplete.
All right. Now I'm in my desktop
folder. I'm going to type DVR
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 resources
folder I have there.
So cd r e s
tab enter
and then 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 now let's see.
I want to go up the folder, go back
to my desktop, because I really
wanted to go into my documents
folder so you can do CD
space dot dot.
And this brings me back up a
directory to my desktop.
Now, you can also put that together
with other
directory levels.
So let's say CD,
dot, backslash,
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's folder.
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 drive
and to do CD space
forward slash D d
backslash and here
I am R and
this is inside of my D drive.
All right, so
that's how you're moving around
inside of folders, inside of
directories, change in directories.
It's a very important concept they
need to be very comfortable with.
All right. So we also have the tree
command and with the tree commandos
is it graphically displays folder
and file structure from the command
line. And I already know what you're
thinking.
You told me that the gooey was
graphical only and the command
line is not graphical at all.
True. You will see I will show you
a demonstration of the triggermen
and you will understand how it is
graphical in nature inside
of the command line.
All right.
So you can also do tree
F and that will show
all the files that are in the
structure as well.
And just like we can do
with the text files, we can pipe
it into more if
the listing is too long.
That way we can go through line
by line and see exactly what's going
through.
And then I will show
you on Linux as well.
All right.
So let's do a
tree and
look at that. I have all sorts of
things on my drive here and that
one way too fast for me.
So I'm going to do a tree
slash and
look at all those files that I have
as well.
Wow, that's too much, I'm going to
interrupt that.
All right, Trix,
and let's pipe that into more.
And now I can take my time
and go through all of these
folders.
All right. So then is how you can
use the tree command.
Let me pull up my
Linux machine and we'll try that.
So we have the tree.
And this shows a graphical
representation from the Linux
as well.
So let me go up
another few and try
and we see a whole bunch of good
stuff.
And same thing with Windows when
you excuse me and
then more.
And we can go through 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
Linux Mint distro, I know that
when I had to do is I had to
use the pseudo AV
install tree command and
we'll go of the Sutta command and
the Atget apt install commands
on a later time in this course.
But what that does is
since the tree command is not
natively installed in
Linux Mint, it
will download and install
the tree command so that you can use
it.
All right. Making directories mkdir
that creates a new directory and MDE
that can also create a directory.
So let's take a look at that.
All right. So I want
to make a new directory on my drive
here. So I'm going to do a
new folder
and dir.
Let's see. Where is it?
Here it is.
New folder.
That's our folder.
All right.
And just like for the Dileep
and the arrest commands, there
is the MD alias for
McNeer for Windows
and Post Assessment.
What is the tree command used for?
Is it a to create new folders?
B, to read files,
see to search through files
or to graphically display
folder structure?
And the answer is D to graphically
display folder structure.
So it is
tree does not create new folders,
that is for the make directory
command or make sure
it does not read files.
That is the type or the more command
that we've covered and it does
not search through files.
That is the fine command.
All right. So in this video we
learned how to change directories,
understood how to change drives,
use the true command and made
new directors.
I hope to see you in the next video.