文件名存储在文件系统中的什么位置?
它不在 inode 或实际文件内容中,因为我们有两个文件名可以指向同一个 inode 的硬链接。
当我阅读时,file(1)
我在手册页中注意到了这一点(强调我的):
将本地定义添加到 /etc/magic 时,请确保保留这些关键字。用户依赖于知道目录中的所有可读文件都印有“文本”一词。不要像伯克利那样将“shell 命令文本”更改为“shell 脚本”。
这句话背后有什么故事?我猜Berkeley
是指,BSD (Berkeley software distribution)
但谷歌没有提供足够的信息。
链接到file(1)
http://man7.org/linux/man-pages/man1/file.1.html
一些挖掘表明该声明是在 27 年前添加的链接
Don't do as one computer vendor did \- change ``shell commands text''
to ``shell script''.
Run Code Online (Sandbox Code Playgroud)
后来改为当前声明链接
Don't do as Berkeley did \- change ``shell commands text''
Run Code Online (Sandbox Code Playgroud)