摘自文档
因此,'mount -t tmpfs -o size=10G,nr_inodes=10k,mode=700 tmpfs /mytmpfs' 将为您提供 /mytmpfs 上的 tmpfs 实例,它可以在 10240 个 inode 中分配 10GB RAM/SWAP,并且只能由 root 访问。
请注意命令行:
mount -t tmpfs -o size=10G,nr_inodes=10k,mode=700 tmpfs /mytmpfs
Run Code Online (Sandbox Code Playgroud)
让我困惑的是第二个tmpfs
。该手册页说什么的选项tmpfs
,这是什么意思?
bash4.3 # pwd
/bin
bash4.3 # ll sh
lrwxrwxrwx. 1 root root 4 May 17 22:22 sh -> bash
bash4.3 # ll bash
-rwxr-xr-x. 1 root root 1072056 May 17 22:22 bash
bash4.3 # bash
bash4.3 # sh
sh-4.3#
Run Code Online (Sandbox Code Playgroud)
我的操作系统是 fedora 24(默认 GNOME 版本)。
从例子中我们可以知道: 下/bin
,bash
是一个二进制可执行文件;sh
是一个软链接bash
。
因此,据我所知,type bash and press enter
应该产生与type sh and press enter
.
当 I 时type bash and press enter
,我得到[root@localhost bin]#
了预期的结果。
但是,如果我 …