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 19:55, Debkanta Mondal wrote: > While ls | > wc -l gives a quick total, it’s not reliable > when filenames contain newlines Neither does ls --count, right? Because file names with newlines can contain substrings that look like counts (this would be particularly a problem with ls -R). Plus, such file names are so rare, and POSIX plans to outlaw them, and if you care about them anyway you can use ls --zero, and so forth. Things might be different if this was a common need that 'ls | wc' didn't satisfy, but I don't see it.