指向大文件的符号链接

指向大文件的符号链接

我有一个大(1 TB)文件,我想通过 http 从 centos 服务器下载,我应该创建一个指向该文件的符号链接到 http 文件目录吗?该链接有效吗?该文件太大,无法在给定的服务器硬盘上复制。如果没有,还有哪些替代方案?

答案1

如果你有的话它会起作用选项 FollowSymLinks启用该DirectoryLocation(或在.htaccess文件中,如果启用了该DirectoryLocation)。

如果您有疑虑,只需在另一个较小的符号链接文件上进行测试,以确保在尝试使用完整文件之前已启用它。

答案2

请参阅挂载--绑定。从安装手册页:

The bind mounts.
          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.
          One can also remount a single file (on a single file).

          This call attaches only (part of) a single filesystem, not  pos‐
          sible  submounts.  The entire file hierarchy including submounts
          is attached a second place using
                 mount --rbind olddir newdir
          or shortoption
                 mount -R olddir newdir

相关内容