[Novalug] Re: [Ma-linux] How to get the number of files in a given directory

Ken Kauffman kkauffman at headfog.com
Wed Jan 9 23:26:52 EST 2008


Sorry.  I missed where you actually specified you needed to also locate
"hidden" files.

Ken

On Jan 9, 2008 10:37 PM, Jay Hart <jhart at kevla.org> wrote:

> > On Wed, Jan 09, 2008 at 08:13:43PM -0500, Jay Hart wrote:
> >> Answered my own question, I wonder why I didn't see this first:
> >>
> >> ls | wc -l
> >>
> >
> >   I flaunted my expertise for figuring that out to a more Unix-savvy
> > friend once, who promptly suggested:
> >
> > set * ; echo $#
> >
>
> Yes, but doesn't return hidden files (files that start with a '.' (dot))
>
> Jay
>
> >   The advantage is that it's all shell commands.  You don't need to hit
> > the disk to load any other programs like ls and wc.
> >
> >   It's useful when you're in some variety of a limited shell or
> > trying to repair a system with a half-dead/dieing disk.
> >
> > Clif
> > --
> > .... Clif Flynt ... http://www.cflynt.com ... clif at cflynt.com ...
> > .. Tcl/Tk: A Developer's Guide (2nd edition) - Morgan Kauffman ..
> > .. 15'th Annual Tcl/Tk Conference:  Oct 2008,  Philadelphia, PA..
> > .............  http://www.tcl.tk/community/tcl2008/  ............
> >
> >
> >
> >
> >
> >
>
>
> _______________________________________________
> Novalug mailing list
> Novalug at calypso.tux.org
> http://calypso.tux.org/cgi-bin/mailman/listinfo/novalug
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://calypso.tux.org/pipermail/novalug/attachments/20080109/ad34bf15/attachment.html 


More information about the Novalug mailing list