This one works for the most part, but has a subtle problem: Files
with spaces in their names get counted multiple times (because wc -w
counts words instead of lines). Use the "wc -l" form.
On Fri, 15 Sep 2000, Anthony E . Greene wrote:
> On 14 Sep 2000 23:26 Adam Sleight wrote:
> >can't think today...how doe one count the number of files within a
> >directory...yes I know du, df, and wc for words in a file.
>
> ls -a | wc -w
>
> --
> Anthony E. Greene <[EMAIL PROTECTED]> <http://www.pobox.com/~agreene/>
> PGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26 C484 A42A 60DD 6C94 239D
> AIM: TonyG05 ICQ: 91183266/TonyGreene Jabber: TonyGreene
> Linux. The choice of a GNU Generation. <http://www.linux.org/>
>
>
>
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list
>
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list