[TriLUG] file and directory count (Tanner wins)

JoJo Almario jalmario at intrahealth.org
Fri Aug 1 13:43:46 EDT 2003


Thanks for the many answers and methods guys.  Actually Tanner's "find"
recipes worked the best for what I needed the command for.  The ls and
ll commands did count the top two . and ..

Thanks again to all who contributed 

-----Original Message-----
From: trilug-admin at trilug.org [mailto:trilug-admin at trilug.org] On Behalf
Of Dan Monjar
Sent: Friday, August 01, 2003 11:27 AM
To: trilug at trilug.org
Subject: Re: [TriLUG] file and directory count

--On Friday, August 01, 2003 11:10:08 AM -0400 Ken Mink 
<kmtrilug at nc.rr.com> wrote:

> Another big problem with doing it with 'ls' is that it won't get dot
> files. If you don't get the dot files in /home, your count will be WAY
> off. If you use 'ls -a', you'll get '.' and '..'. You'll have to
> remember to subtract 2 from the count.
> The find command is the way to go.

or you could use 'ls -A' to not get '.' and '..'...

ls has way too many options.

--
Daniel Monjar
IS Manager, Technical Services
bioMérieux, Inc.
Durham, NC US




More information about the TriLUG mailing list