قالب وردپرس درنا توس
Home / Apple / mojave – Why have symbolic links between files in folders at the same depth?

mojave – Why have symbolic links between files in folders at the same depth?



I'm not so familiar with Homebrew, but the pattern you describe is what I've seen other software installers use: it makes various binary programs available under a directory, while making it easy to tell which software package they come from. The screenshot below is from an article on Homebrew, showing a list of the "/ usr / local / opt" directory, with the various symbolic links pointing to "/ usr / local / Cellar" subdirectories. For example, while most binary points point to a package of the same name, this is not the case for "npm", where the symbolic link makes it easy to tell that it is part of the same package as "node" and "node". Symbolic links used here for file system organizational purposes: All files in a package are held together in one place, while made available from other directories as needed.

  Enter picture description here

You may also be interested in an example of how symbolic links are sometimes used without pointing to another directory at all. Take a look at the end of ls -l / usr / bin | grip vim which will display different links pointing to "vim" in the same directory, for example "ex" and "view". As the man's side for "vim" explains:

         Vim behaves differently, depending on the name of the command (exe
Clipable can still be the same file).

vim The "normal" way, everything is standard.

Ex Start in Ex mode. Go to Normal mode with the command ": we".
Can also be done with the "-e" argument.

see Start in read-only mode. You will be protected from writing
files. Can also be done with the "-R" argument.


Source link