Now, you know how to use a Greb command in order to filter some text to input.
For example, output from Alaska amount could be filtered using GRAP comment and you could see all the
specific lines.
Also, you could use grep command in order to field or contents of specific text file.
Now, let me explain you, what is link and what is the difference between hard and soft links.
And afterwards we will create some links ourselves.
Let me just show you some links that already exist in this Linux computer.
Let's see.
Dittos lesbian folder.
I am already down A.l.
Let's released files and folders using L option and I see here Linux.
They start with Al here and Leon looks like this.
Here is some name and it points to a NAS or name.
And in this case, this is executable file hostname.
And we are actually able to enter.
This is getable.
Name.
Here like this and get result.
Here was an Nazarro link.
One name points to a NAS name.
Let me scroll up and here you'll find a NAS or links like Riot.
And it points to this location.
Also, here is one more link.
We could filter this output only by links and for that we could use grap comment.
Let's use it.
BYB here we'll be Greb and we could eyes our field or by our character as starting symbol in every line.
Or we could filter by this arrow.
Let's use field by this arrow grep.
And here we'll be in double quotes.
Backslash.
That arrow like this we need to use here.
This backslash in order to escape this slash symbol because otherwise it will be interpreted as a regular
expression symbol.
All right.
Let's press enter.
And now I see that those arrows will be highlighted in red.
And now we see only links.
For example, C h.
Points to Desch and the S.J points to you grb you.
Nola's the following.
Let's compare our contents of C, H and desk files located here in this bin folder.
And let's have a look at their part initials and their sizes.
All right, let's type.
Alas, dispell.
Next comes again.
Pipe operator grep and heal this type for example.
Simply C h.
And it will filter files that contain c, h somewhere.
And we are interested in this line.
And this line you see that c h is basically a link to Desch and this file is located here.
But please note is that there are different initials for these desk file.
And for this link, this is actually a link with a fool.
Read the write and execute access for all users.
And this file has only read the riot and execute access by a specific user.
And it doesn't have a riot access for group users and also users.
And it is simply file.
That's why he had the beginning.
We see Desch and also there are different sizes in those files.
Here was the size of this file.
And here was the size of this link.
And to this example here is soft link.
It is soft link to specific file.
You could create actually multiple soft links that will point to the same file into the next lecture.
I'll explain you how to do that.
No, just trust me that the soft link is simply pointer to specific file.
Same I can say about this link.
It is link to best file.
And here is actually this best file.
And again, here was a difference in size here with size of this best file.
And here is size of this soft link.
Now let me show you an example of to link and explain the difference between soft link and hardly.
And let's again, leased files and folders here in this lesbian folder using LSC best alchemist without
grep feel the ring and the bliss or accept that.
I have explained you that those Lambros here indicate quantity of links for specific files and directories.
And actually one here means that there are no oso links for this specific file.
But let's try to find the files that have more than one.
Lin.
For example, here with such file.
And we could basically field this output and find only files that have two links.
And for that, we could simply copy this text, including crude.
Let's copy it and go back to LSD El.
And here let's use again grap command.
And here in double quotes based what we call just Corbitt like soul to space.
Let's press enter.
And now I'll see Oleksyk results and you see that in red.
This part in each line is highlighted.
And let's compare this line and this line.
What you see here, you see actually same potentials here and here and also you see same file size here
and here and a same modification date here and here.
And that is a sign that those two files are actually two different hard links.
And now let me show you how you could actually verify that.
You could add additional option to last comment and this option is I like so if you press enter, you'll
see additional numbers here in the first column.
And in this throws throw and last throw.
Those numbers are the same.
And those numbers are called, I note, and actually Linux users.
I note data structure and there are special numbers, gold eye nodes.
And actually every file has link to specific, I note.
And in this case, this file and this file actually point to the same I note, same number here, here
and here.
And that means that when you change any of those files and others are filed, that does have the link
to the same location and memory will be changed as well.
That is Cardellini.
It has same permissions, same I know no same size and same modification date.
That is a difference between huddling and softly.
And please note that if you remove specific hard link, for example, if you remove this file, this
file will be still present here.
And let's actually create our own soft and hard links.
But let's put it in the next laptop.
I'll see you there.
Bye bye.