linux - 我如何在 Linux 中创建多级软链接(soft link)或者可以这样做吗?

标签 linux unix symlink

<分区>

我继承了无法触及的旧脚本 - 不要问。它引用安装在位置 /SuperSoft/SomeSoft/

的软件

软件的新版本,自买断后重新制作,安装到位 /usr/local/SomeSoft

我一直在尝试在根级别创建以下软链接(soft link):

ln -s SuperSoft/SomeSoft//usr/local/SomeSoft/

我不想在根级别创建一个 SuperSoft 目录。这能做到吗?

最佳答案

在文件系统的两个部分中拥有相同的文件也可以通过挂载来实现。

来自 linux 上的“man mount”:

          Since Linux 2.4.0 it is possible to remount  part  of  the  file
          hierarchy somewhere else. The call is
                 mount --bind olddir newdir
          or shortoption
                 mount -B olddir newdir
          or fstab entry is:
                 /olddir /newdir none bind

          After  this  call the same contents is accessible in two places.

关于linux - 我如何在 Linux 中创建多级软链接(soft link)或者可以这样做吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16719245/

相关文章:

linux - 如何使用 linux 将一个文件分割成多个不同行的文件?

file - 为什么要创建一个空文件?

ftp - 在没有 SSH 的服务器上创建符号链接(symbolic link)?

linux - 如何在 Linux mint 15 mate 中重启 "menu"?

php - 使用 PHP 在 Linux 服务器上运行 C++ 可执行文件

linux - 获取 "-("和 ")-"之间的字符串,linux 目录

linux - Mac (UNIX) 系统上的 PATH 是什么?

c - 在 unix 上使用套接字发送消息 - 奇怪的行为

python - python 中的原子 `ln -sf`(符号链接(symbolic link)覆盖现有文件)

macos - 重启后符号链接(symbolic link)消失