1
00:00:00,350 --> 00:00:03,410
Hello, my name is Typhoon and welcome to another lecture of our course.

2
00:00:03,440 --> 00:00:08,990
In this lecture of our course, you will learn about the traversing directories and you will use the

3
00:00:08,990 --> 00:00:10,760
absolute directories for references.

4
00:00:10,760 --> 00:00:12,110
So let's get started.

5
00:00:26,260 --> 00:00:32,920
So you can you change the directory to move your shell session to another directory in the Linux file

6
00:00:32,920 --> 00:00:33,400
system?

7
00:00:33,400 --> 00:00:37,450
So this CD command, this syntax is pretty simple.

8
00:00:37,450 --> 00:00:43,960
So you first enter the CD, which means change directory, and after that you enter the destination

9
00:00:43,960 --> 00:00:44,320
here.

10
00:00:44,320 --> 00:00:48,220
So the CD command may take a single argument as a destination here.

11
00:00:48,220 --> 00:00:51,670
So you will enter destination here.

12
00:00:51,670 --> 00:00:55,810
So which this destination specifies a directory you want to go.

13
00:00:56,020 --> 00:01:02,350
So if you don't specify a destination on the CD command, it takes you to your home directory here.

14
00:01:02,350 --> 00:01:10,000
So if you make it like that, CD downloads and after that CD and as you can see here we go to Home Directory

15
00:01:10,000 --> 00:01:10,630
again.

16
00:01:10,630 --> 00:01:17,860
So you will in this chapter you will learn the um, each of these methods and you will learn about the

17
00:01:17,860 --> 00:01:24,640
differences between these two methods are important to understand as you traverse the file system so

18
00:01:24,640 --> 00:01:31,220
you can reference a directory name with within the virtual directory system using the absolute directory

19
00:01:31,220 --> 00:01:31,730
reference.

20
00:01:31,730 --> 00:01:37,070
So the absolute directory reference defines exactly where the directory is in the virtual directory

21
00:01:37,070 --> 00:01:39,080
structure and starting at the root.

22
00:01:39,080 --> 00:01:44,120
So think of the absolute directory reference as the full name for the directory.

23
00:01:44,150 --> 00:01:52,190
So an absolute directory reference always begins with a forward slash indicating the virtual directory

24
00:01:52,190 --> 00:01:53,450
system's root.

25
00:01:53,450 --> 00:02:01,040
So fuse to reference user binaries contained within the user directories.

26
00:02:01,310 --> 00:02:08,120
Bind bind some directory here so you you will use so user here and here you can.

27
00:02:08,420 --> 00:02:12,860
As you can see whenever I click to the tab here, oops, here.

28
00:02:12,950 --> 00:02:20,570
So whenever I click the tab button on my keyboard it will show make.

29
00:02:21,320 --> 00:02:24,950
Uh, possible inputs for my command here.

30
00:02:24,950 --> 00:02:29,330
So in this case, we will enter the bin here so usr bin.

31
00:02:29,330 --> 00:02:32,600
And as you can see, we changed our directory to usr bin.

32
00:02:32,600 --> 00:02:36,470
So there's no w as to exactly where you want to go.

33
00:02:36,470 --> 00:02:41,990
So to move to a specific location on the file system using the absolute directory or reference, you

34
00:02:41,990 --> 00:02:46,250
just specify the path name in the C command.

35
00:02:46,250 --> 00:02:47,780
So we can also do like that.

36
00:02:47,780 --> 00:02:49,460
For example, let's make it go to home.

37
00:02:49,460 --> 00:02:55,220
And as you can see, we are in the home and let's go to user bin user.

38
00:02:56,530 --> 00:02:57,490
USR bin.

39
00:02:59,580 --> 00:03:03,990
And as you can see here, we changed our directory to usr bin here.

40
00:03:04,830 --> 00:03:14,280
Also, did you notice that the this example that the prompt originally had a title here, had a title

41
00:03:14,280 --> 00:03:21,270
in it, and after that change to Native Directory occurred, the title was replaced by being here.

42
00:03:21,270 --> 00:03:22,310
As you can see here.

43
00:03:22,320 --> 00:03:28,860
Firstly, we had a title here, but whenever we clicked and changed the directory there, we showed

44
00:03:28,860 --> 00:03:30,470
us that we are you.

45
00:03:30,510 --> 00:03:34,920
We are at a different directory other than our home directory here.

46
00:03:34,920 --> 00:03:40,680
So this is where the command line interface prompt can help you keep track of where you are in the virtual

47
00:03:40,680 --> 00:03:41,730
directory structure.

48
00:03:41,730 --> 00:03:47,970
So the tiled indicates that your cell session is located in your home directory.

49
00:03:47,970 --> 00:03:48,750
Like this, for example.

50
00:03:48,750 --> 00:03:52,710
Let's go to home and as you can see, we are in the home now.

51
00:03:53,570 --> 00:04:00,530
So after you move out of your home directory, the partial directory reference is shown in the prompt.

52
00:04:00,530 --> 00:04:03,220
So if the prompt has been configured to do so.

53
00:04:03,230 --> 00:04:10,100
So if your prompt has not been configured to show the shell session current absolute directory location,

54
00:04:10,100 --> 00:04:13,970
then you can display the location via a shell command.

55
00:04:14,000 --> 00:04:22,450
The WD command displays the shell session's current directory location, which is called the present

56
00:04:22,460 --> 00:04:22,760
actual.

57
00:04:22,760 --> 00:04:24,380
Let me write it right here.

58
00:04:24,380 --> 00:04:25,160
So.

59
00:04:26,330 --> 00:04:28,880
So this called present.

60
00:04:33,140 --> 00:04:34,220
Working.

61
00:04:39,070 --> 00:04:39,910
Directory.

62
00:04:46,970 --> 00:04:47,360
Here.

63
00:04:47,360 --> 00:04:52,580
As you can see, p w d means that present working directory.

64
00:04:52,580 --> 00:05:02,180
So if you write the D here and as you can see, we printed us the our working directory in our shell

65
00:05:02,180 --> 00:05:02,390
here.

66
00:05:02,390 --> 00:05:14,450
So if we go to user bin CD user bin or again CD bin here and whenever we write the p w d present working

67
00:05:14,450 --> 00:05:14,870
directory.

68
00:05:14,870 --> 00:05:18,260
And as you can see here, we printed our current working directory.

69
00:05:18,260 --> 00:05:23,600
As you can see, these are not the same because we changed our working directory.

70
00:05:24,110 --> 00:05:30,530
So you can move to any level within the entire Linux virtual directory structure from any level.

71
00:05:30,530 --> 00:05:39,140
Using the absolute directory reference, we can also go to, for example, CD actual let's clear the,

72
00:05:39,140 --> 00:05:41,720
we can also go to CD var log here.

73
00:05:41,720 --> 00:05:44,840
And as you can see here, we got to var log.

74
00:05:44,840 --> 00:05:52,650
So this changed here and whenever we write the CD and as you can see here, we are seeing our working

75
00:05:52,650 --> 00:05:53,400
directory now.

76
00:05:53,400 --> 00:05:58,950
So you can also quickly jump to your home directory from any level within the Linux virtual directory

77
00:05:58,950 --> 00:06:01,470
structure with just a simple CD command.

78
00:06:01,470 --> 00:06:05,100
And as you can see here we are in the home now.

79
00:06:05,100 --> 00:06:11,040
However, if you are just working with your own home directory structure, often using the absolute

80
00:06:11,040 --> 00:06:13,290
directory references can get tedious.

81
00:06:13,290 --> 00:06:20,700
So for example, if you are already in the directory of our home column, it seems somewhat cumbersome

82
00:06:20,700 --> 00:06:22,920
to have to type this command.

83
00:06:22,920 --> 00:06:31,920
So CD home Kali and after that documents here or Kali two downloads here and as you can see we got two

84
00:06:31,950 --> 00:06:36,130
downloads so you can just get to your documents directory.

85
00:06:36,150 --> 00:06:40,770
Fortunately, there is a simpler solution we can use the instead of using.

86
00:06:40,770 --> 00:06:43,530
So actually let me write that down here.

87
00:06:43,530 --> 00:06:50,400
So in this here, this whole lecture, we use the absolute absolute.

88
00:06:52,180 --> 00:06:53,160
Or actually we can.

89
00:06:53,170 --> 00:06:56,680
So we use the absolute path.

90
00:06:57,310 --> 00:06:59,560
Directory APD.

91
00:07:00,100 --> 00:07:03,320
But now we're going to use the relative directory.

92
00:07:03,340 --> 00:07:05,770
Relative directory here.

93
00:07:05,770 --> 00:07:09,190
So now in order to do that, this is just a simple here.

94
00:07:09,190 --> 00:07:15,810
So instead of writing CD home Kali Linux download, now we can just write here.

95
00:07:15,820 --> 00:07:17,590
Actually, let's go to our.

96
00:07:19,430 --> 00:07:21,920
Here's clear CD.

97
00:07:21,920 --> 00:07:23,540
So we are in the home directory.

98
00:07:23,890 --> 00:07:26,840
CD As you can see, we are in the home directory now.

99
00:07:27,350 --> 00:07:32,720
In order to go to downloads again, just right, it downloads and see the downloads.

100
00:07:32,720 --> 00:07:35,780
And as you can see here, we got into the downloads here.

101
00:07:35,780 --> 00:07:42,170
So relative directory references, lawsuit, a specific destination directory reference relative to

102
00:07:42,170 --> 00:07:43,490
your current location.

103
00:07:43,490 --> 00:07:48,890
So a relative directory reference doesn't start with the forward slash as you can see here.

104
00:07:49,700 --> 00:07:55,100
Instead, a relative directory reference starts with either a directory name, so if you are reversing

105
00:07:55,130 --> 00:08:01,040
to a directory under your current directory or a special character, for example, if you are in your

106
00:08:01,040 --> 00:08:08,720
home directory and want to move to your here downloads directory or downloads sub directory, you can

107
00:08:08,720 --> 00:08:12,860
use the CD command along with a relative directory reference.

108
00:08:12,860 --> 00:08:15,860
So here, let's actually go to a different here.

109
00:08:15,860 --> 00:08:18,200
So CD pictures.

110
00:08:18,230 --> 00:08:20,870
Oops, do do we have pictures here?

111
00:08:22,210 --> 00:08:22,810
Yeah.

112
00:08:23,890 --> 00:08:24,610
And as you can see.

113
00:08:24,610 --> 00:08:26,590
Yeah, see the pictures.

114
00:08:27,100 --> 00:08:31,900
And as you can see, we changed our directory to pictures and.

115
00:08:31,900 --> 00:08:32,300
Yeah.

116
00:08:32,330 --> 00:08:32,740
P.w.d..

117
00:08:32,860 --> 00:08:35,620
And as you can see, we are in the pictures directory.

118
00:08:35,620 --> 00:08:44,350
So in this example I want to note that the no forward slashes, the no forward slashes was used.

119
00:08:44,350 --> 00:08:51,190
So instead of relative directory reference was used and preset, the work directory was changed from

120
00:08:51,190 --> 00:08:59,140
our home collie to home collie pictures with or downloads with less.

121
00:08:59,140 --> 00:09:01,350
Um with less typing.

122
00:09:01,360 --> 00:09:03,160
I'm waiting you in the next lecture.
