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

Re: question about ls

Thanks for your quick reply!

do you mean "ls -l | wc -l"
it should be letter l, not number 1

On Wednesday, September 26, 2018 6:34 AM, Ben Caradoc-Davies <ben@transient.nz> wrote:

On 26/09/2018 10:27, Long Wind wrote:

> can ls show number of items in a folder?Thanks!

I use:

ls -1 | wc -l

To include items whose names start with ".", add the "a" or "A" argument
to ls ("man ls" for details).

For more advanced searches (recursive or filtering on file type), I use

Kind regards.

Ben Caradoc-Davies <ben@transient.nz>
Transient Software Limited <https://transient.nz/>
New Zealand

Reply to: