[rhelv6-list] file permissions contains dot in rhel6
Collins, Kevin [BEELINE]
KCollins at chevron.com
Wed Dec 8 16:54:39 UTC 2010
That's great for Linux, but it doesn't make for very portable scripting
since stat is not on all flavors of Unix... :)
-----Original Message-----
From: rhelv6-list-bounces at redhat.com
[mailto:rhelv6-list-bounces at redhat.com] On Behalf Of Jonathan S Billings
Sent: Wednesday, December 08, 2010 5:27 AM
To: rhelv6-list at redhat.com
Subject: Re: [rhelv6-list] file permissions contains dot in rhel6
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
_______________________________________________
rhelv6-list mailing list
rhelv6-list at redhat.com
https://www.redhat.com/mailman/listinfo/rhelv6-list
More information about the rhelv6-list
mailing list