On 30/08/17 23:05, Harald Dunkel wrote:
> Hi folks,
> 
> One of my favorites is
> 
>       ls -ld `find /some/dir -print`
> 
> It creates a much better readable output than "ls -R".
> 
> Its shortcomings are clear: 2 many arguments on the command
> line, takes an awful lot of time to execute, problems with
> space chars, etc. Surely this command line could be optimized.
> 
> I would like to suggest to implement a new recursive directory
> feature in ls itself, and to introduce a new command line
> option ("ls -e"?).
> 
> 
> Just a suggestion, of course. Keep on your good work

This would be more scalable:

  find . -printf '%P\0' | xargs -r0 ls -ld --color

Though the sorting would be off as chunked by xargs,
and not done per directory.

There is also the -ls option to find if you don't need colors

To get good sorting per directory an option like you suggest could be useful,
though TBH I'm not sure there are enough benefits over the
existing ls format to warrant a new option.

Another option is to use: tree -DugsipfC

cheers,
Pádraig

Reply via email to