coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Request for ls


From: Eric Blake
Subject: Re: Request for ls
Date: Fri, 08 Apr 2011 08:03:22 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9

On 04/08/2011 07:13 AM, Berengar Lehr wrote:
> Dear coreutils-ppl,
> 
> is it possible to make ls show me permission/modes as octal numbers?

Thanks for the report.

Unfortunately, ls is already way too overloaded - there's very little
room for adding more short options.

But what you are asking for is already present in stat(1), which is also
friendlier for scripting (unambiguous access to exactly the information
you want, rather than having to parse fields of ls output and possibly
getting it wrong).

> 
> old:
> -rw-r--r--  1 ber ber   11176 2011-04-05 17:37 Test
> new:
> 644 1 ber ber   11176 2011-04-05 17:37 Test

stat -c '%a' Test

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]