On 03/18/2013 04:43 PM, Sakse Dalum wrote:
> Hi there,
> 
> I recently found myself wanting ls to show file permissions in octal format, 
> so
> I decided to implement the feature. Being somewhat unfamiliar with C coding 
> and
> C coding standards in particular, I've hunched my way through the 
> implementation
> method, but seeing that it's only a few lines of code, it shouldn't break
> anything as far as I can see.
> 
> Anywho, I've attached a diff to this mail, which may or may not be applicable 
> to
> the most recent version (I just did an apt-get source in Trisquel 6.0 to get 
> the
> source for coreutils).

Thanks for the patch.
It's a close call as to whether this is needed,
but the current consensus is that it isn't needed.

There was a previous discussion that `stat -c %a` suffices:
  http://lists.gnu.org/archive/html/coreutils/2011-04/msg00036.html

Also one can use find(1) to output octal permissions:
  find -printf "%m %p\n

thanks,
Pádraig.

Reply via email to