@
@
@Twitt2019-09-24 11:28:41
linux
@Twitt, 2019-09-24 11:28:41

What is the meaning of symlinks?

What are symlinks for? I understand that this is essentially a label. We can take some file that is deep in all my folders and create a symlink that will be on the desktop, and the only plus I see is that I will access the file faster instead of cat /home/yet/folder/and/ yet/file.txt I'll do a cat ~/Desktop/symlink, which saves me the time of not having to cd to the original file remembering all the directories it's in. It's just that when deploying enva at work, I have this item:

ln -s /var/www/project/workspace/core/code/
/var/www/project/workspace/core/code/symlink

What is the meaning of the symlink in this case? We don’t save time in any way, we put the symlink symlink essentially in the same place as the folder itself

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
iBird Rose, 2019-09-24
_

Well, the simplest example: you have a site on the domain.ru prod
. If you want to make another dev, you create the dev.domain.ru folder and copy the site there.
but you still have a few hundred terabytes upload folder. and without this folder, the site on the virgin will not work.

R
Ronald McDonald, 2019-09-24
@Zoominger

This is the question, this is the question.

Symbolic links are used for more convenient organization of the file structure on the computer, as: they
allow one file or directory to have several names and different attributes;
are free from some of the limitations inherent in hard links (the latter only operate within the same file system (one partition) and cannot refer to directories).

Source: https://ru.wikipedia.org/wiki/%D0%A1%D0%B8%D0%BC%D...
Nothing much to add.

S
Sanes, 2019-09-24
@Sanes

For example, a disk partition has run out of space and we do not want to remount it.

P
pfg21, 2019-09-24
@pfg21

No, it's fundamentally not true.
a shortcut, as you understand, you use the Windows concept, this is a file with the .lnk extension that is processed at the level of the programs of the same explorer.exe aka File Explorer. this program should be able to file .lnk ie. understand its structure and be able to follow its links as part of your code.
as you understand, such support is not present in any code.
a symlink is an abstraction of the filesystem level. those. Symlinks are processed by the file system driver, and the program does not even suspect that it has used a symlink redirect to another location.
for the program everything is absolutely transparent and support in the code is not required.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question