16

We have scripts looking at the output of ls -l output for permission information that have been failing recently on RHEL v6 systems which appear to be showing an extra . at the end of the permission entry that didn't used to be there before:

[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

What does the full stop signify? And what else can appear in it's place?

1
  • 1
    We have scripts looking at the output of ls, that is generally a bad idea. Parsing ls is a bad idea. You would be better off looking at the output of stat or some other tool for this purpose.
    – Zoredache
    Apr 1, 2014 at 23:42

2 Answers 2

19

info ls shows:

  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.
1
  • aha - had looked at man ls' but didn't think of info ls' - thanks Aug 24, 2011 at 17:11
8

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .