WEBVTT

00:00.500 --> 00:01.990
All right. Hello and welcome to

00:02.009 --> 00:03.110
command line BASIX.

00:03.380 --> 00:05.269
This module is going over

00:05.270 --> 00:06.589
navigating directories.

00:06.620 --> 00:08.269
My name is Christopher Haler and

00:08.270 --> 00:09.270
let's begin.

00:10.340 --> 00:12.229
So for this video, we're

00:12.230 --> 00:13.309
going to learn how to change

00:13.310 --> 00:15.019
directories, understand how to

00:15.020 --> 00:16.819
change drives inside of

00:16.850 --> 00:18.140
the command line,

00:18.800 --> 00:20.569
using the tree command, learn about

00:20.570 --> 00:21.991
that and make new directories

00:22.940 --> 00:24.859
from within the command line.

00:27.190 --> 00:28.709
Assessment, what command can be

00:29.050 --> 00:30.809
used to make a new director?

00:31.240 --> 00:32.950
Is it a new order,

00:33.610 --> 00:35.200
B make directory,

00:35.770 --> 00:37.959
C mkdir

00:38.350 --> 00:40.140
or D Dir tech

00:40.180 --> 00:42.009
tech new and

00:42.010 --> 00:43.179
we are going to make a new

00:43.180 --> 00:44.180
directory.

00:44.870 --> 00:47.559
The answer is C mkdir

00:47.570 --> 00:49.179
four make directory

00:50.710 --> 00:52.033
the new dure command is not

00:52.570 --> 00:53.570
a real command.

00:54.070 --> 00:56.259
The Make Directory Command spelled

00:56.260 --> 00:57.260
out that while

00:58.090 --> 00:59.830
yes C is

01:00.430 --> 01:02.289
the shortened version of

01:02.290 --> 01:03.466
make directory, the full

01:04.180 --> 01:05.797
spelled out make directory is not

01:06.010 --> 01:07.909
a real command and dir

01:07.960 --> 01:08.960
dash dash new is not

01:10.120 --> 01:11.120
a command to create

01:11.950 --> 01:12.950
a new directory.

01:14.770 --> 01:16.659
All right, so changing directories

01:16.660 --> 01:17.979
is something you are going to do

01:18.100 --> 01:20.169
very frequently from the command

01:20.170 --> 01:21.910
line, and it's a very important

01:22.900 --> 01:24.520
skill. You need to understand

01:24.850 --> 01:26.139
that where you can move through the

01:26.140 --> 01:27.579
directories like you would with the

01:27.580 --> 01:29.295
GUI and how you're clicking through

01:29.620 --> 01:30.999
a folder, going through different

01:31.000 --> 01:33.069
levels and copying

01:33.070 --> 01:34.687
pasting from different techniques

01:34.750 --> 01:36.009
that we've learned in this course as

01:36.010 --> 01:37.010
well.

01:37.060 --> 01:39.099
So in order to change directory,

01:39.100 --> 01:40.509
you're going to use C, D,

01:40.930 --> 01:42.639
and this is the same command that is

01:42.640 --> 01:44.200
in Linux and Windows,

01:44.500 --> 01:46.019
and these have the same kind of

01:46.540 --> 01:47.814
basic concepts behind them

01:48.370 --> 01:50.439
to where if you do cede

01:50.770 --> 01:52.419
space, dot, dot,

01:52.980 --> 01:54.909
that will go up a directory.

01:55.270 --> 01:57.129
And if you use on

01:57.130 --> 01:59.109
windows, if you use code

01:59.650 --> 02:00.650
forward slash D and

02:01.510 --> 02:03.078
then put in a new drive, it will

02:03.370 --> 02:05.319
help you change which drive you are

02:05.320 --> 02:07.119
on and which drive you're looking

02:07.120 --> 02:08.379
through from the command line.

02:09.009 --> 02:10.749
And that's for Windows only because

02:10.750 --> 02:12.370
that's the way that Windows likes to

02:13.240 --> 02:14.612
manage those kind of drives.

02:14.800 --> 02:16.417
From that perspective where Linux

02:16.990 --> 02:19.119
has the root of the file system

02:19.120 --> 02:20.349
and there's no need to change

02:20.350 --> 02:21.350
drives.

02:21.610 --> 02:22.809
So let me give you a quick

02:22.810 --> 02:23.810
demonstration.

02:25.030 --> 02:26.349
All right, so I have my command

02:26.350 --> 02:27.967
prompt open, as you can see right

02:28.060 --> 02:30.009
now, I'm at the C users

02:30.010 --> 02:31.900
and then my user folder right now.

02:32.440 --> 02:34.389
So I'm going to do DÃ¼rer to see what

02:34.390 --> 02:35.889
is inside my user folder.

02:37.210 --> 02:38.533
And I have a whole bunch of

02:38.650 --> 02:40.599
different folders inside

02:40.600 --> 02:41.600
of there.

02:41.890 --> 02:43.089
So when I want to do is I want to

02:43.090 --> 02:44.259
get into my

02:45.250 --> 02:46.300
desktop folder.

02:46.510 --> 02:47.879
So I'm going to do CD

02:48.850 --> 02:49.850
desk and first time

02:50.770 --> 02:51.770
for autocomplete.

02:52.690 --> 02:54.159
All right. Now I'm in my desktop

02:54.160 --> 02:56.289
folder. I'm going to type DVR

02:56.290 --> 02:58.079
again, enter

02:58.300 --> 03:00.129
and look at all these files I have

03:00.130 --> 03:01.149
on my desktop.

03:01.660 --> 03:03.729
And now I can go

03:03.730 --> 03:04.808
ahead and I'm going to

03:05.650 --> 03:06.650
go into my resources

03:07.600 --> 03:08.600
folder I have there.

03:08.620 --> 03:10.680
So cd r e s

03:10.840 --> 03:11.840
tab enter

03:13.240 --> 03:15.004
and then again to see what is inside

03:15.580 --> 03:16.580
of this folder.

03:17.560 --> 03:18.939
And I have another folder inside of

03:18.940 --> 03:20.410
there, the Frankenstein, I got

03:20.770 --> 03:21.950
to text files as well.

03:22.400 --> 03:24.330
So now let's see.

03:24.340 --> 03:25.749
I want to go up the folder, go back

03:25.750 --> 03:27.009
to my desktop, because I really

03:27.010 --> 03:28.479
wanted to go into my documents

03:28.480 --> 03:30.580
folder so you can do CD

03:30.850 --> 03:32.610
space dot dot.

03:33.280 --> 03:34.652
And this brings me back up a

03:35.080 --> 03:36.740
directory to my desktop.

03:37.420 --> 03:39.759
Now, you can also put that together

03:40.990 --> 03:41.990
with other

03:43.000 --> 03:44.010
directory levels.

03:44.020 --> 03:45.699
So let's say CD,

03:45.970 --> 03:48.129
dot, backslash,

03:48.130 --> 03:49.130
dot, dot.

03:49.630 --> 03:51.879
I won't go up to directory levels,

03:51.880 --> 03:53.439
see how I skipped past

03:54.280 --> 03:56.319
the my user folder and

03:56.320 --> 03:58.035
my desktop folder and went directly

03:58.150 --> 03:59.339
into this user's folder.

04:00.040 --> 04:01.314
So that is a useful way to

04:01.900 --> 04:02.900
go up.

04:02.920 --> 04:05.199
Or you can just type in the folder

04:05.200 --> 04:06.009
directly.

04:06.010 --> 04:07.839
So if I do change directory

04:07.840 --> 04:09.729
and then go straight to the root of

04:09.730 --> 04:11.830
the C drive brings me right there.

04:12.520 --> 04:14.319
Now if I want to change my directory

04:14.320 --> 04:15.819
and get to my D drive

04:16.180 --> 04:17.180
and to do CD space

04:18.550 --> 04:20.829
forward slash D d

04:21.459 --> 04:22.459
backslash and here

04:23.290 --> 04:25.269
I am R and

04:25.270 --> 04:27.129
this is inside of my D drive.

04:28.370 --> 04:29.370
All right, so

04:30.290 --> 04:31.489
that's how you're moving around

04:31.490 --> 04:33.379
inside of folders, inside of

04:33.380 --> 04:35.060
directories, change in directories.

04:35.090 --> 04:36.589
It's a very important concept they

04:36.600 --> 04:38.360
need to be very comfortable with.

04:39.590 --> 04:41.305
All right. So we also have the tree

04:41.660 --> 04:43.699
command and with the tree commandos

04:43.700 --> 04:45.649
is it graphically displays folder

04:45.650 --> 04:47.365
and file structure from the command

04:47.420 --> 04:49.009
line. And I already know what you're

04:49.010 --> 04:50.010
thinking.

04:50.630 --> 04:52.639
You told me that the gooey was

04:52.640 --> 04:54.110
graphical only and the command

04:54.560 --> 04:56.380
line is not graphical at all.

04:56.900 --> 04:58.850
True. You will see I will show you

04:59.210 --> 05:01.399
a demonstration of the triggermen

05:01.400 --> 05:02.989
and you will understand how it is

05:02.990 --> 05:04.264
graphical in nature inside

05:04.910 --> 05:05.910
of the command line.

05:06.200 --> 05:07.039
All right.

05:07.040 --> 05:08.720
So you can also do tree

05:09.170 --> 05:11.089
F and that will show

05:11.780 --> 05:13.850
all the files that are in the

05:13.880 --> 05:14.910
structure as well.

05:15.560 --> 05:16.687
And just like we can do

05:17.540 --> 05:19.519
with the text files, we can pipe

05:19.520 --> 05:21.529
it into more if

05:21.530 --> 05:22.800
the listing is too long.

05:22.830 --> 05:24.349
That way we can go through line

05:24.860 --> 05:26.569
by line and see exactly what's going

05:26.570 --> 05:27.570
through.

05:27.860 --> 05:29.689
And then I will show

05:29.690 --> 05:30.980
you on Linux as well.

05:31.340 --> 05:32.179
All right.

05:32.180 --> 05:33.500
So let's do a

05:34.610 --> 05:36.499
tree and

05:36.530 --> 05:38.147
look at that. I have all sorts of

05:38.270 --> 05:40.189
things on my drive here and that

05:40.190 --> 05:41.480
one way too fast for me.

05:41.720 --> 05:44.110
So I'm going to do a tree

05:45.920 --> 05:48.259
slash and

05:48.260 --> 05:49.939
look at all those files that I have

05:49.940 --> 05:50.940
as well.

05:52.660 --> 05:54.219
Wow, that's too much, I'm going to

05:54.220 --> 05:55.220
interrupt that.

05:55.420 --> 05:57.339
All right, Trix,

05:58.240 --> 06:00.519
and let's pipe that into more.

06:00.970 --> 06:02.499
And now I can take my time

06:02.980 --> 06:04.750
and go through all of these

06:04.930 --> 06:05.930
folders.

06:07.630 --> 06:09.247
All right. So then is how you can

06:09.310 --> 06:10.870
use the tree command.

06:10.880 --> 06:12.399
Let me pull up my

06:15.670 --> 06:17.509
Linux machine and we'll try that.

06:17.890 --> 06:19.180
So we have the tree.

06:19.960 --> 06:21.399
And this shows a graphical

06:21.400 --> 06:23.680
representation from the Linux

06:24.490 --> 06:25.269
as well.

06:25.270 --> 06:26.560
So let me go up

06:27.520 --> 06:29.589
another few and try

06:29.740 --> 06:31.209
and we see a whole bunch of good

06:31.210 --> 06:32.210
stuff.

06:32.290 --> 06:34.089
And same thing with Windows when

06:34.120 --> 06:36.249
you excuse me and

06:36.250 --> 06:37.389
then more.

06:38.140 --> 06:40.269
And we can go through take our time

06:40.270 --> 06:41.589
looking through this folder

06:41.590 --> 06:43.300
structure to help us understand

06:43.990 --> 06:45.159
what we're looking at from the

06:45.160 --> 06:46.160
command line.

06:46.480 --> 06:48.639
Now, if you're using a

06:49.120 --> 06:50.590
Linux Mint distro, I know that

06:50.980 --> 06:52.352
when I had to do is I had to

06:52.990 --> 06:54.769
use the pseudo AV

06:54.940 --> 06:57.009
install tree command and

06:57.010 --> 06:58.599
we'll go of the Sutta command and

06:58.600 --> 07:00.459
the Atget apt install commands

07:00.460 --> 07:01.899
on a later time in this course.

07:02.500 --> 07:04.690
But what that does is

07:04.900 --> 07:06.321
since the tree command is not

07:06.760 --> 07:08.829
natively installed in

07:08.830 --> 07:09.830
Linux Mint, it

07:10.870 --> 07:13.029
will download and install

07:13.030 --> 07:14.739
the tree command so that you can use

07:14.740 --> 07:15.740
it.

07:16.390 --> 07:18.999
All right. Making directories mkdir

07:19.210 --> 07:21.430
that creates a new directory and MDE

07:21.730 --> 07:24.079
that can also create a directory.

07:24.370 --> 07:26.140
So let's take a look at that.

07:28.570 --> 07:29.570
All right. So I want

07:30.520 --> 07:32.529
to make a new directory on my drive

07:32.530 --> 07:34.290
here. So I'm going to do a

07:35.860 --> 07:37.449
new folder

07:38.710 --> 07:39.710
and dir.

07:40.470 --> 07:41.500
Let's see. Where is it?

07:41.860 --> 07:42.860
Here it is.

07:43.090 --> 07:43.929
New folder.

07:43.930 --> 07:44.930
That's our folder.

07:46.780 --> 07:47.780
All right.

07:49.330 --> 07:51.699
And just like for the Dileep

07:51.700 --> 07:53.589
and the arrest commands, there

07:53.590 --> 07:55.689
is the MD alias for

07:55.930 --> 07:57.369
McNeer for Windows

07:58.460 --> 07:59.670
and Post Assessment.

08:00.190 --> 08:02.279
What is the tree command used for?

08:02.350 --> 08:04.360
Is it a to create new folders?

08:04.840 --> 08:06.430
B, to read files,

08:06.790 --> 08:08.740
see to search through files

08:08.980 --> 08:10.959
or to graphically display

08:10.990 --> 08:11.990
folder structure?

08:13.720 --> 08:15.699
And the answer is D to graphically

08:15.700 --> 08:17.229
display folder structure.

08:17.560 --> 08:19.440
So it is

08:19.450 --> 08:21.600
tree does not create new folders,

08:21.610 --> 08:22.899
that is for the make directory

08:22.900 --> 08:23.900
command or make sure

08:24.760 --> 08:26.069
it does not read files.

08:26.080 --> 08:27.999
That is the type or the more command

08:28.000 --> 08:29.470
that we've covered and it does

08:29.920 --> 08:31.079
not search through files.

08:31.090 --> 08:32.589
That is the fine command.

08:33.850 --> 08:34.839
All right. So in this video we

08:34.840 --> 08:36.189
learned how to change directories,

08:36.400 --> 08:37.899
understood how to change drives,

08:38.380 --> 08:39.801
use the true command and made

08:40.330 --> 08:41.199
new directors.

08:41.200 --> 08:42.820
I hope to see you in the next video.

