Web lists-archives.com

Re: question about ls




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 find.

Kind regards.

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