Which files are updated as devices are mounted and unmounted to provide information on the currently mounted devices and the options used? (Choose TWO correct answers.)
A. /proc/dtab
B. /etc/mtab
C. /etc/fstab
D. /proc/mounts
E. /proc/devices
题解
选项 A,没有「/proc/dtab」文件。
选项 B,「/etc/mtab」是「mount」指令用来记录挂载状态的设置档。此为正确答案。其实这文件就是「/proc/self/mounts」文件的符号链接(symbolic link)。
选项 C,「/etc/fstab」是开机时会被自动挂载的文件系统的设置档。「mount」指令的「-a」参数也可以挂载「fstab」(/etc/fstab)内所有没使用「noauto」参数的文件系统。
选项 D,「/proc/mounts」是 Linux 内核用来记录挂载状态的文件。此为正确答案。其实这文件就是「/proc/self/mounts」文件的符号链接(symbolic link)。
选项 E,「/proc/devices」用来记录目前读取得到的设备。
