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: [email protected]
[mailto:[email protected]] On Behalf Of Jonathan S Billings
Sent: Wednesday, December 08, 2010 5:27 AM
To: [email protected]
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 <[email protected]>
College of Engineering - CAEN - Unix and Linux Support

_______________________________________________
rhelv6-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv6-list

_______________________________________________
rhelv6-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv6-list

Reply via email to