1
00:00:04,640 --> 00:00:08,220
We have just talked about the difference between hard and soft links.

2
00:00:08,640 --> 00:00:14,430
But the way they actually needed Linux, if you want to create a copy of specific file, you could,

3
00:00:14,430 --> 00:00:20,310
of course, use S.P. comment and copy one file to another user file and use them separately.

4
00:00:20,760 --> 00:00:23,400
But if you want to reuse specific file.

5
00:00:23,460 --> 00:00:25,350
And the only change is location.

6
00:00:25,560 --> 00:00:28,110
You could simply use link to existing file.

7
00:00:28,590 --> 00:00:29,940
Same with directories.

8
00:00:30,450 --> 00:00:32,890
There was no need to copy entire directory.

9
00:00:33,180 --> 00:00:35,600
You could simply create a link to that directory.

10
00:00:35,850 --> 00:00:36,450
And that's it.

11
00:00:37,020 --> 00:00:43,530
For example, if I go here one level up, seedy and seedy, actually, dude folder and list files and

12
00:00:43,530 --> 00:00:46,720
folders here, I'll see that such folders as.

13
00:00:46,920 --> 00:00:49,090
As being Liebe and LEEP thought.

14
00:00:49,110 --> 00:00:54,360
The two are simply links to Özer directories like user SBM.

15
00:00:54,930 --> 00:01:01,170
I could verify that the user has been is directory by using a simply Alaska amount and ILEC actually

16
00:01:01,170 --> 00:01:02,730
contents of that folder.

17
00:01:03,540 --> 00:01:08,280
And that means that you are able to create links, eyes or for files or for directories.

18
00:01:08,710 --> 00:01:12,390
And now let's do some experiments and let's create the links ourselves.

19
00:01:12,780 --> 00:01:14,560
Let's see the home directory.

20
00:01:14,880 --> 00:01:16,840
And let's at least files and folders here.

21
00:01:17,940 --> 00:01:21,330
And here I see some files and folders that I have created before.

22
00:01:21,630 --> 00:01:25,800
If you see here, empty folder, please create any new text file.

23
00:01:26,580 --> 00:01:29,490
I'll create no link to file a file.

24
00:01:29,580 --> 00:01:36,510
But the extent that is already present here in this folder for that I will use comment l m and first,

25
00:01:36,600 --> 00:01:38,410
as the first argument here will be.

26
00:01:38,470 --> 00:01:40,110
Name of existing file.

27
00:01:40,500 --> 00:01:45,750
In this case, File five takes time and the space will be made of the link.

28
00:01:46,260 --> 00:01:52,340
And let's suppose that I'll create a link with name file five that link dot dig.

29
00:01:53,100 --> 00:01:56,370
And actually I'll create first soft link.

30
00:01:56,820 --> 00:01:57,630
Let me add here.

31
00:01:57,900 --> 00:02:01,650
Soft link like salt and I'll add additional option here.

32
00:02:02,250 --> 00:02:06,270
This s to indicate that I want to create soft link.

33
00:02:07,250 --> 00:02:10,780
Let's press enter and let's list files and folders now.

34
00:02:11,460 --> 00:02:13,800
And I see no file file file.

35
00:02:14,250 --> 00:02:15,270
Softly Dodik.

36
00:02:16,530 --> 00:02:18,810
And if I have a look at contours of this file.

37
00:02:19,960 --> 00:02:22,990
Like, so I alsi actually contours of a file.

38
00:02:23,050 --> 00:02:24,030
Five to dig text.

39
00:02:25,200 --> 00:02:25,590
All right.

40
00:02:25,830 --> 00:02:30,300
Let's not list filed using L option unless this L.

41
00:02:30,920 --> 00:02:33,740
And no, I see that file file desk solved.

42
00:02:33,930 --> 00:02:37,780
Linda digs deep, is looking to file a five to six deal.

43
00:02:38,350 --> 00:02:44,390
And he, of course, you'll see a difference in permissions, difference in size and difference in data

44
00:02:44,480 --> 00:02:50,820
modification and does because I have just created solely to link to a file of five boutiques deep.

45
00:02:52,250 --> 00:02:53,840
All right, let's note the following.

46
00:02:54,230 --> 00:02:58,630
Let's read one more copy of a five takes D using S.P..

47
00:02:58,650 --> 00:03:01,570
Come and grab him and let's copy a file.

48
00:03:01,680 --> 00:03:05,570
Fire that the extreme do file seeks to dig deep.

49
00:03:06,000 --> 00:03:06,470
Like so.

50
00:03:07,650 --> 00:03:09,290
Let's list files and folders now.

51
00:03:09,510 --> 00:03:11,370
And there was additional file.

52
00:03:11,400 --> 00:03:16,710
Six Dodig Steve sighs is the same as size of file, five to 60.

53
00:03:16,800 --> 00:03:17,430
Here it is.

54
00:03:18,030 --> 00:03:20,140
But those files are completed.

55
00:03:20,160 --> 00:03:21,600
Two different files.

56
00:03:22,050 --> 00:03:27,180
And if you change file five or the deep, there will be no change in file.

57
00:03:27,240 --> 00:03:28,200
Six takes deep.

58
00:03:28,920 --> 00:03:31,860
But there will be change in this link.

59
00:03:32,940 --> 00:03:33,590
Let's try that.

60
00:03:33,660 --> 00:03:36,100
Let's modify file five DODIG Steve.

61
00:03:36,570 --> 00:03:38,440
And for that, let's use nano ed.

62
00:03:38,730 --> 00:03:40,030
Nano File.

63
00:03:40,680 --> 00:03:41,870
Five Dodig Steve.

64
00:03:42,620 --> 00:03:44,080
And let's modify first line.

65
00:03:44,170 --> 00:03:49,260
And here I'll type file was just modified like.

66
00:03:49,260 --> 00:03:51,630
So let's say it changes control.

67
00:03:52,410 --> 00:03:52,890
Yes.

68
00:03:53,160 --> 00:03:57,750
And press enter and no less with contents of file five to dig deep.

69
00:03:57,990 --> 00:03:59,340
Got file five.

70
00:03:59,610 --> 00:04:03,770
Actually I could use a head head file file to the extreme.

71
00:04:04,290 --> 00:04:05,010
Sorry Dipo.

72
00:04:05,330 --> 00:04:08,040
The extreme actually let me use a dash.

73
00:04:08,130 --> 00:04:15,390
An option and with only thrust like that and one like so and ILC file was just modified.

74
00:04:16,350 --> 00:04:19,200
Let's now read contents of link to this file.

75
00:04:19,649 --> 00:04:27,630
Had this in one file five this soft link to dig deep and I'll see the same contents.

76
00:04:28,170 --> 00:04:32,100
And this because this file is simply link to this file.

77
00:04:33,210 --> 00:04:36,040
Let's no read the contents of file 636, do you.

78
00:04:37,350 --> 00:04:42,990
Let's again we'd only frost line and I see the first line in this file remained unchanged.

79
00:04:43,450 --> 00:04:46,890
This because file six is gloppy of file file.

80
00:04:46,920 --> 00:04:48,720
The text still not its link.

81
00:04:49,750 --> 00:04:50,170
All right.

82
00:04:50,440 --> 00:04:52,430
Let's again, at least files and folders here.

83
00:04:52,780 --> 00:04:55,060
And let's not delete a file.

84
00:04:55,120 --> 00:04:56,310
Five batiks deep.

85
00:04:57,780 --> 00:04:57,930
R.

86
00:04:58,270 --> 00:04:59,250
M file.

87
00:04:59,470 --> 00:05:03,310
Five days steam and less list files and folders again.

88
00:05:04,190 --> 00:05:07,790
And now I see that there is still this link here in this list.

89
00:05:08,210 --> 00:05:11,170
But if I tried to read it, got to file five.

90
00:05:11,240 --> 00:05:12,590
Best of to take Steve.

91
00:05:12,970 --> 00:05:14,200
I'll see error.

92
00:05:14,330 --> 00:05:16,600
No such file or directory.

93
00:05:18,110 --> 00:05:23,090
And doesn't because file five destination file for this link was actually removed.

94
00:05:24,250 --> 00:05:24,660
All right.

95
00:05:24,960 --> 00:05:27,300
Let's not simply remove this soft link.

96
00:05:27,630 --> 00:05:33,250
Our M file five soft link, and this file is not absolute.

97
00:05:33,690 --> 00:05:40,320
All right, let's not green card link for file six, but the extreme for that, we will use the same

98
00:05:40,320 --> 00:05:40,730
comment.

99
00:05:40,830 --> 00:05:41,000
L.

100
00:05:41,060 --> 00:05:41,340
N.

101
00:05:41,760 --> 00:05:43,290
But now, without any options.

102
00:05:43,530 --> 00:05:45,780
L m here will be a file name.

103
00:05:45,960 --> 00:05:47,550
Name of the original file.

104
00:05:47,750 --> 00:05:48,590
File six.

105
00:05:48,710 --> 00:05:49,560
Dot the extreme.

106
00:05:49,860 --> 00:05:52,200
And here will the name of the hard link.

107
00:05:52,680 --> 00:05:54,480
Let's say file six.

108
00:05:54,660 --> 00:05:58,340
This hard link dot the extreme anthem.

109
00:05:58,800 --> 00:06:00,510
Let's list files and folders now.

110
00:06:00,840 --> 00:06:04,320
And now I see newly created file file six.

111
00:06:04,400 --> 00:06:06,040
This card Linda takes Steve.

112
00:06:07,160 --> 00:06:12,790
And those files have same permissions, same size and same modification date.

113
00:06:13,880 --> 00:06:20,380
List, no, try to modify file six to dig steam nano file seeks to dig steam.

114
00:06:21,070 --> 00:06:24,500
And here, let's again add some changes here on the frost line.

115
00:06:24,980 --> 00:06:27,810
And Link was just modified.

116
00:06:28,940 --> 00:06:30,740
Like, so let's say it changes.

117
00:06:31,610 --> 00:06:32,090
Yes.

118
00:06:32,750 --> 00:06:35,930
And now let's have a look at the contents of this folder.

119
00:06:36,470 --> 00:06:38,270
And I see that file.

120
00:06:38,270 --> 00:06:43,910
Seek's was modified, but a file six hard link was modified as well.

121
00:06:44,150 --> 00:06:46,070
You'll see the same modification time.

122
00:06:47,000 --> 00:06:52,580
And if I read contents of file things, the text now and contents of file six hard Linda to external,

123
00:06:52,810 --> 00:06:54,260
they will be exactly the same.

124
00:06:54,410 --> 00:06:54,860
Let's do it.

125
00:06:55,370 --> 00:06:56,230
Let's use again.

126
00:06:56,270 --> 00:06:57,750
Had this.

127
00:06:57,890 --> 00:07:00,670
And one file six under the extreme.

128
00:07:01,280 --> 00:07:08,900
I see this first line in this file similar to X2 and Liz did the same with the huddling file six Sandesh

129
00:07:09,020 --> 00:07:12,120
huddling and I see same line.

130
00:07:12,960 --> 00:07:17,900
And that means that now those files both reflect same change.

131
00:07:18,530 --> 00:07:22,820
And the reason for that is that they point to the same I note in memory.

132
00:07:23,180 --> 00:07:26,600
Let's go back to Alexander's Elle comment and add additional option.

133
00:07:26,710 --> 00:07:28,310
I that will show us.

134
00:07:28,580 --> 00:07:29,020
I know.

135
00:07:29,080 --> 00:07:29,580
No.

136
00:07:29,840 --> 00:07:33,530
And this I know number is the same for those most files.

137
00:07:35,000 --> 00:07:41,390
And finally, let's try to remove one of those files and see Wells or another file will remain in place

138
00:07:41,480 --> 00:07:41,840
or not.

139
00:07:42,510 --> 00:07:44,520
And let's remove a file since the dig still.

140
00:07:45,320 --> 00:07:47,510
Our M file seeks to dig steam.

141
00:07:48,810 --> 00:07:52,680
Unless and I don't see five or six to this day here in this list.

142
00:07:52,770 --> 00:07:54,690
But I still see file six.

143
00:07:54,770 --> 00:07:56,210
How Linda digs do.

144
00:07:58,230 --> 00:07:58,800
Here it is.

145
00:07:59,610 --> 00:08:05,940
And now let's again with contents of this file, had the dish and one file, six hard link, and we

146
00:08:05,940 --> 00:08:08,610
see that it still has same contents.

147
00:08:08,930 --> 00:08:12,030
That's because I know it was the same number as we have seen here.

148
00:08:12,390 --> 00:08:14,070
You still present in memory of.

149
00:08:15,240 --> 00:08:21,730
This is what happens when you remove one of the hard links, all remaining killings will still have

150
00:08:21,730 --> 00:08:23,060
the same content as before.

151
00:08:24,080 --> 00:08:26,570
But there's a difference between hard and soft links.

152
00:08:26,840 --> 00:08:32,390
And again, you could use them if you will simply need to have a specific file or files or folders in

153
00:08:32,450 --> 00:08:33,679
different locations.

154
00:08:35,049 --> 00:08:36,280
This all guys, for this lecture.

155
00:08:36,309 --> 00:08:37,210
I hope you enjoyed it.

156
00:08:37,450 --> 00:08:40,929
And next, let me explain you how to use a find comment.

157
00:08:41,320 --> 00:08:42,039
I'll see you next.

158
00:08:42,130 --> 00:08:42,500
Bye bye.

