bug#79710: [PATCH] ls: add --count and --count-list options to display file, directory, and symlink counts and counts with list of contents

Paul Eggert <[email protected]>
Newsgroups gmane.comp.gnu.core-utils.bugs
Organization UCLA Computer Science Department
Message-ID <[email protected]>
On 2025-10-28 12:18, Debkanta Mondal wrote:
> With --count, you get
> everything in one place: directories, files, links, and the table

Sure, but we get all that info with -l already.

Counting is just one of many things that one can already do with the 
output of 'ls', and one cannot reasonably expect to have an 'ls' option 
for every possible form of postprocessing. Suppose I want to count every 
regular file with permission -r--r--r--, for example - should we have a 
separate 'ls' option for that too?

It's simpler to leave 'ls' alone and process its output as needed.

> no need extra pipeline/
> complex command for this simple and frequently required output

I don't see that it's frequently required.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.