coreutils
[Top][All Lists]
Advanced

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

Re: A small suggestion to improve ls


From: Mike Hodson
Subject: Re: A small suggestion to improve ls
Date: Sat, 27 Dec 2014 08:05:56 -0700


On Sat, Dec 27, 2014 at 4:44 AM, Pádraig Brady <address@hidden> wrote:
  find -maxdepth 1 -printf '%m ' -ls

Of note, this also prints the modes that the awk script above leaves out or otherwise mangles:

Find outputs exactly what I expect:

 4750 812805444  100 -rwsr-x---   1 root     wheel      101896 Feb  2  2014 /usr/sbin/mtr

The awk magic on the other hand, well, not so much:

 650 -rwsr-x--- 1 root wheel 101896 Feb  2  2014 /usr/sbin/mtr

So whoever wrote that bit on stackoverflow is a bit short-sighted in the potential for errors on special modes.

I personally will alias something like 'lsoctal' to the find command.

My $0.02; inflation adjusted.

Mike


reply via email to

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