/proc/1/mountinfo 文件的用途是什么?当询问时它说它是空的
/proc/1$ file mountinfo
mountinfo: empty
Run Code Online (Sandbox Code Playgroud)
当使用“less mountinfo”打开时,它显示这种类型的条目(最后 2 个条目)
219 28 0:51 / /home/isa rw,nosuid,nodev,relatime shared:280 - ecryptfs /home/isa/.Private rw,ecryptfs_fnek_sig=dc471b2a4b622179,ecryptfs_sig=1b0c19aa8a93a0cb,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs
223 308 0:49 / /run/user/1000/gvfs rw,nosuid,nodev,relatime shared:287 - fuse.gvfsd-fuse gvfsd-fuse rw,user_id=1000,group_id=1000
Run Code Online (Sandbox Code Playgroud)
关于 proc 文件系统
\n https://en.wikipedia.org/wiki/Procfs
\n http://tldp.org/LDP/sag/html/proc-fs.html
\n以下摘录 \n下面是http://man7.org/linux/man-pages/man5/proc.5.html
/proc/[pid]/mountinfo (since Linux 2.6.26)\n This file contains information about mount points in the\n process\'s mount namespace (see mount_namespaces(7)). It sup\xe2\x80\x90\n plies various information (e.g., propagation state, root of\n mount for bind mounts, identifier for each mount and its par\xe2\x80\x90\n ent) that is missing from the (older) /proc/[pid]/mounts file,\n and fixes various other problems with that file (e.g., nonex\xe2\x80\x90\n tensibility, failure to distinguish per-mount versus per-\n superblock options).\n\n The file contains lines of the form:\n\n36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue\n(1)(2)(3) (4) (5) (6) (7) (8) (9) (10) (11)\n\n The numbers in parentheses are labels for the descriptions\n below:\n\n (1) mount ID: a unique ID for the mount (may be reused after\n umount(2)).\n\n (2) parent ID: the ID of the parent mount (or of self for the\n root of this mount namespace\'s mount tree).\n\n If the parent mount point lies outside the process\'s root\n directory (see chroot(2)), the ID shown here won\'t have a\n corresponding record in mountinfo whose mount ID (field\n 1) matches this parent mount ID (because mount points\n that lie outside the process\'s root directory are not\n shown in mountinfo). As a special case of this point,\n the process\'s root mount point may have a parent mount\n (for the initramfs filesystem) that lies outside the\n process\'s root directory, and an entry for that mount\n point will not appear in mountinfo.\n\n (3) major:minor: the value of st_dev for files on this\n filesystem (see stat(2)).\n\n (4) root: the pathname of the directory in the filesystem\n which forms the root of this mount.\n\n (5) mount point: the pathname of the mount point relative to\n the process\'s root directory.\n\n (6) mount options: per-mount options.\n\n (7) optional fields: zero or more fields of the form\n "tag[:value]"; see below.\n\n (8) separator: the end of the optional fields is marked by a\n single hyphen.\n\n (9) filesystem type: the filesystem type in the form\n "type[.subtype]".\n\n (10) mount source: filesystem-specific information or "none".\n\n (11) super options: per-superblock options.\n\n Currently, the possible optional fields are shared, master,\n propagate_from, and unbindable. See mount_namespaces(7) for a\n description of these fields. Parsers should ignore all unrec\xe2\x80\x90\n ognized optional fields.\n\n For more information on mount propagation see: Documenta\xe2\x80\x90\n tion/filesystems/sharedsubtree.txt in the Linux kernel source\n tree.\nRun Code Online (Sandbox Code Playgroud)\n