coreutils
[Top][All Lists]
Advanced

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

Re: suggestion for a new recursive directory ls


From: Pádraig Brady
Subject: Re: suggestion for a new recursive directory ls
Date: Wed, 30 Aug 2017 23:41:04 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

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

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