当前位置: 技术问答>linux和unix
Redhatlinux 文件系统如何理解
来源: 互联网 发布时间:2015-11-25
本文导语: 我刚刚接触Linux,在官方手册中看到这2段对Linux中磁盘分区和Mount Points的解说的例子, For example, if partition /dev/hda5 were mounted on /usr, that would mean that all files and directories under /usr would physically reside on /dev...
我刚刚接触Linux,在官方手册中看到这2段对Linux中磁盘分区和Mount Points的解说的例子,
For example, if partition /dev/hda5 were mounted on /usr, that would mean that all files and directories under /usr would physically reside on /dev/hda5. So the file /usr/share/doc/FAQ/txt/Linux-FAQ would be stored on /dev/hda5, while the file /etc/X11/gdm/Sessions/Gnome would not.
Continuing our example, it is also possible that one or more directories below /usr would be mount points for other partitions. For instance, a partition (say, /dev/hda7) could be mounted on /usr/local, meaning that /usr/local/man/whatis would then reside on /dev/hda7 rather than /dev/hda5.
中文意思基本理解,但对其描述的文件系统方面还有不明白,跟据上面的例子,是不是说在Linux系统中的根目录和其它目录的关系,只是一个逻辑表达,像/usr/share/doc/FAQ/txt/Linux-FAQ 只说明文件存放在/usr下面的目录之下,而其在磁盘中的物理位置,就由Mount上的分区不同而不同。那么Mount上的分区,每次都不同的话,是不是会把文件分散存在不同的分区,但在逻辑上还是在同一个目录底下?
For example, if partition /dev/hda5 were mounted on /usr, that would mean that all files and directories under /usr would physically reside on /dev/hda5. So the file /usr/share/doc/FAQ/txt/Linux-FAQ would be stored on /dev/hda5, while the file /etc/X11/gdm/Sessions/Gnome would not.
Continuing our example, it is also possible that one or more directories below /usr would be mount points for other partitions. For instance, a partition (say, /dev/hda7) could be mounted on /usr/local, meaning that /usr/local/man/whatis would then reside on /dev/hda7 rather than /dev/hda5.
中文意思基本理解,但对其描述的文件系统方面还有不明白,跟据上面的例子,是不是说在Linux系统中的根目录和其它目录的关系,只是一个逻辑表达,像/usr/share/doc/FAQ/txt/Linux-FAQ 只说明文件存放在/usr下面的目录之下,而其在磁盘中的物理位置,就由Mount上的分区不同而不同。那么Mount上的分区,每次都不同的话,是不是会把文件分散存在不同的分区,但在逻辑上还是在同一个目录底下?
|
感觉你理解的基本是正确的,不过你说的每次分区都不同的话就没考虑现实情况。如果你把一个盘符挂载到了某个目录底下后,一般会将其写入/etc/fstab文件中吧,而不需要每次使用都挂载。因为硬盘毕竟不同于u盘。就好像在windows下,你把好多文件都放在D盘了,那你下次开机后,是不是会把文件都从D盘转移到E盘呢?