[rhelv6-list] file permissions contains dot in rhel6
Jonathan S Billings
jsbillin at umich.edu
Wed Dec 8 13:27:21 UTC 2010
On 12/07/2010 05:59 PM, Jean-Yves LENHOF wrote:
> Bad scripts ;-)
> Waiting for some specific output whithout a dot
You might want to consider replacing the 'ls' in your script with the
output of 'stat', since you can request the format of the output however
you like. For example, 'stat --format "%A" filename' will produce the
human readable access rights that you're looking for -- and if this is
something being parsed by a script, you might end up having cleaner
output to read.
I don't see any documentation that indicates there's a way to make the
new 'ls' output the access rights without the dot if the filesystem has
SELinux attributes.
--
Jonathan Billings <jsbillin at umich.edu>
College of Engineering - CAEN - Unix and Linux Support
More information about the rhelv6-list
mailing list