RHEL6 ls 输出中的新句号/句点是什么意思?

RHEL6 ls 输出中的新句号/句点是什么意思?

我们有脚本查看输出的输出ls -l以获取权限信息,这些脚本最近在 RHEL v6 系统上出现故障,似乎.在权限条目的末尾显示了一个以前没有的额外内容:

[root@rhel6vm ~]# ls -l
total 44
-rw-------. 1 root root  1399 Aug 17 15:01 anaconda-ks.cfg
-rw-r--r--. 1 root root 25485 Aug 17 15:01 install.log
-rw-r--r--. 1 root root  7253 Aug 17 14:59 install.log.syslog
[root@rhel6vm ~]#
          ^
          | up there

句号代表什么?还有什么可以代替它?

答案1

info ls 显示:

  Following the file mode bits is a single character that specifies
 whether an alternate access method such as an access control list
 applies to the file.  When the character following the file mode
 bits is a space, there is no alternate access method.  When it is
 a printing character, then there is such a method.

 GNU `ls' uses a `.' character to indicate a file with an SELinux
 security context, but no other alternate access method.

 A file with any other combination of alternate access methods is
 marked with a `+' character.

答案2

GNU ls 使用.字符来指示具有 SELinux 安全上下文的文件,但没有其他替代访问方法。

具有任何其他替代访问方法组合的文件都以字符标记+

相关内容