1
00:00:04,590 --> 00:00:09,600
Now, you know how to use a Greb command in order to filter some text to input.

2
00:00:09,810 --> 00:00:14,640
For example, output from Alaska amount could be filtered using GRAP comment and you could see all the

3
00:00:14,640 --> 00:00:15,540
specific lines.

4
00:00:16,110 --> 00:00:20,160
Also, you could use grep command in order to field or contents of specific text file.

5
00:00:20,850 --> 00:00:26,040
Now, let me explain you, what is link and what is the difference between hard and soft links.

6
00:00:26,460 --> 00:00:29,880
And afterwards we will create some links ourselves.

7
00:00:30,540 --> 00:00:34,950
Let me just show you some links that already exist in this Linux computer.

8
00:00:35,400 --> 00:00:35,760
Let's see.

9
00:00:35,760 --> 00:00:36,900
Dittos lesbian folder.

10
00:00:36,950 --> 00:00:38,810
I am already down A.l.

11
00:00:38,850 --> 00:00:44,390
Let's released files and folders using L option and I see here Linux.

12
00:00:44,610 --> 00:00:48,240
They start with Al here and Leon looks like this.

13
00:00:48,720 --> 00:00:52,110
Here is some name and it points to a NAS or name.

14
00:00:52,650 --> 00:00:55,830
And in this case, this is executable file hostname.

15
00:00:56,460 --> 00:00:58,110
And we are actually able to enter.

16
00:00:58,320 --> 00:00:59,620
This is getable.

17
00:00:59,680 --> 00:00:59,970
Name.

18
00:01:00,060 --> 00:01:01,770
Here like this and get result.

19
00:01:02,490 --> 00:01:03,760
Here was an Nazarro link.

20
00:01:04,290 --> 00:01:06,510
One name points to a NAS name.

21
00:01:07,080 --> 00:01:11,620
Let me scroll up and here you'll find a NAS or links like Riot.

22
00:01:11,850 --> 00:01:13,590
And it points to this location.

23
00:01:14,460 --> 00:01:16,180
Also, here is one more link.

24
00:01:16,830 --> 00:01:22,430
We could filter this output only by links and for that we could use grap comment.

25
00:01:22,590 --> 00:01:23,490
Let's use it.

26
00:01:24,070 --> 00:01:30,870
BYB here we'll be Greb and we could eyes our field or by our character as starting symbol in every line.

27
00:01:31,200 --> 00:01:33,780
Or we could filter by this arrow.

28
00:01:34,170 --> 00:01:36,380
Let's use field by this arrow grep.

29
00:01:36,420 --> 00:01:38,100
And here we'll be in double quotes.

30
00:01:38,180 --> 00:01:38,900
Backslash.

31
00:01:39,180 --> 00:01:42,330
That arrow like this we need to use here.

32
00:01:42,390 --> 00:01:48,330
This backslash in order to escape this slash symbol because otherwise it will be interpreted as a regular

33
00:01:48,330 --> 00:01:49,320
expression symbol.

34
00:01:49,680 --> 00:01:50,010
All right.

35
00:01:50,250 --> 00:01:51,060
Let's press enter.

36
00:01:51,240 --> 00:01:54,900
And now I see that those arrows will be highlighted in red.

37
00:01:55,320 --> 00:01:57,840
And now we see only links.

38
00:01:57,930 --> 00:01:59,340
For example, C h.

39
00:01:59,460 --> 00:02:03,970
Points to Desch and the S.J points to you grb you.

40
00:02:04,750 --> 00:02:05,590
Nola's the following.

41
00:02:06,030 --> 00:02:12,450
Let's compare our contents of C, H and desk files located here in this bin folder.

42
00:02:12,830 --> 00:02:17,010
And let's have a look at their part initials and their sizes.

43
00:02:17,910 --> 00:02:19,260
All right, let's type.

44
00:02:19,350 --> 00:02:20,550
Alas, dispell.

45
00:02:20,760 --> 00:02:21,630
Next comes again.

46
00:02:21,640 --> 00:02:24,810
Pipe operator grep and heal this type for example.

47
00:02:24,840 --> 00:02:25,990
Simply C h.

48
00:02:26,430 --> 00:02:30,030
And it will filter files that contain c, h somewhere.

49
00:02:30,480 --> 00:02:32,820
And we are interested in this line.

50
00:02:33,240 --> 00:02:41,490
And this line you see that c h is basically a link to Desch and this file is located here.

51
00:02:42,180 --> 00:02:46,460
But please note is that there are different initials for these desk file.

52
00:02:46,710 --> 00:02:51,010
And for this link, this is actually a link with a fool.

53
00:02:51,210 --> 00:02:54,480
Read the write and execute access for all users.

54
00:02:55,540 --> 00:03:00,850
And this file has only read the riot and execute access by a specific user.

55
00:03:01,150 --> 00:03:05,350
And it doesn't have a riot access for group users and also users.

56
00:03:05,950 --> 00:03:07,260
And it is simply file.

57
00:03:07,420 --> 00:03:08,390
That's why he had the beginning.

58
00:03:08,530 --> 00:03:13,780
We see Desch and also there are different sizes in those files.

59
00:03:14,110 --> 00:03:15,980
Here was the size of this file.

60
00:03:16,150 --> 00:03:18,580
And here was the size of this link.

61
00:03:19,590 --> 00:03:22,560
And to this example here is soft link.

62
00:03:23,190 --> 00:03:25,770
It is soft link to specific file.

63
00:03:26,520 --> 00:03:32,250
You could create actually multiple soft links that will point to the same file into the next lecture.

64
00:03:32,280 --> 00:03:33,630
I'll explain you how to do that.

65
00:03:34,390 --> 00:03:38,790
No, just trust me that the soft link is simply pointer to specific file.

66
00:03:39,150 --> 00:03:41,640
Same I can say about this link.

67
00:03:42,000 --> 00:03:43,860
It is link to best file.

68
00:03:44,010 --> 00:03:46,020
And here is actually this best file.

69
00:03:46,320 --> 00:03:50,430
And again, here was a difference in size here with size of this best file.

70
00:03:50,640 --> 00:03:53,160
And here is size of this soft link.

71
00:03:54,360 --> 00:03:59,930
Now let me show you an example of to link and explain the difference between soft link and hardly.

72
00:04:00,560 --> 00:04:06,420
And let's again, leased files and folders here in this lesbian folder using LSC best alchemist without

73
00:04:06,450 --> 00:04:09,540
grep feel the ring and the bliss or accept that.

74
00:04:09,600 --> 00:04:17,250
I have explained you that those Lambros here indicate quantity of links for specific files and directories.

75
00:04:17,850 --> 00:04:23,250
And actually one here means that there are no oso links for this specific file.

76
00:04:23,730 --> 00:04:27,450
But let's try to find the files that have more than one.

77
00:04:27,520 --> 00:04:27,770
Lin.

78
00:04:28,470 --> 00:04:30,300
For example, here with such file.

79
00:04:30,960 --> 00:04:36,690
And we could basically field this output and find only files that have two links.

80
00:04:37,050 --> 00:04:40,510
And for that, we could simply copy this text, including crude.

81
00:04:40,950 --> 00:04:43,730
Let's copy it and go back to LSD El.

82
00:04:44,100 --> 00:04:46,050
And here let's use again grap command.

83
00:04:46,140 --> 00:04:50,880
And here in double quotes based what we call just Corbitt like soul to space.

84
00:04:51,470 --> 00:04:52,590
Let's press enter.

85
00:04:52,860 --> 00:04:56,490
And now I'll see Oleksyk results and you see that in red.

86
00:04:56,730 --> 00:04:59,040
This part in each line is highlighted.

87
00:05:00,000 --> 00:05:03,330
And let's compare this line and this line.

88
00:05:05,340 --> 00:05:14,130
What you see here, you see actually same potentials here and here and also you see same file size here

89
00:05:14,160 --> 00:05:18,570
and here and a same modification date here and here.

90
00:05:20,260 --> 00:05:26,500
And that is a sign that those two files are actually two different hard links.

91
00:05:27,750 --> 00:05:30,220
And now let me show you how you could actually verify that.

92
00:05:30,790 --> 00:05:38,320
You could add additional option to last comment and this option is I like so if you press enter, you'll

93
00:05:38,320 --> 00:05:41,140
see additional numbers here in the first column.

94
00:05:42,130 --> 00:05:44,680
And in this throws throw and last throw.

95
00:05:44,860 --> 00:05:46,560
Those numbers are the same.

96
00:05:48,110 --> 00:05:53,620
And those numbers are called, I note, and actually Linux users.

97
00:05:53,720 --> 00:05:59,390
I note data structure and there are special numbers, gold eye nodes.

98
00:06:00,440 --> 00:06:04,580
And actually every file has link to specific, I note.

99
00:06:05,510 --> 00:06:13,010
And in this case, this file and this file actually point to the same I note, same number here, here

100
00:06:13,130 --> 00:06:13,670
and here.

101
00:06:14,690 --> 00:06:21,290
And that means that when you change any of those files and others are filed, that does have the link

102
00:06:21,350 --> 00:06:24,560
to the same location and memory will be changed as well.

103
00:06:25,340 --> 00:06:26,250
That is Cardellini.

104
00:06:26,930 --> 00:06:33,860
It has same permissions, same I know no same size and same modification date.

105
00:06:34,670 --> 00:06:37,400
That is a difference between huddling and softly.

106
00:06:38,210 --> 00:06:44,510
And please note that if you remove specific hard link, for example, if you remove this file, this

107
00:06:44,510 --> 00:06:46,820
file will be still present here.

108
00:06:48,020 --> 00:06:51,260
And let's actually create our own soft and hard links.

109
00:06:51,380 --> 00:06:52,760
But let's put it in the next laptop.

110
00:06:52,970 --> 00:06:53,690
I'll see you there.

111
00:06:53,810 --> 00:06:54,160
Bye bye.

