Re: Simple file count question

2004-03-16 Thread Jonathan Arnold
Dave Carrera wrote: I know this is going to be simple but I cant find a suitable answer by trawling the web so I ask how do I count the number of certain files in a directory? So I am in my dir and want to count how many files begin with db and show me the number. I hope you can help me and thank y

Re: Simple file count question

2004-03-16 Thread Joshua Lokken
* Dave Carrera <[EMAIL PROTECTED]> [2004-03-15 23:02]: > Hi List, > > I know this is going to be simple but I cant find a suitable answer by > trawling the web so I ask how do I count the number of certain files in a > directory? > > So I am in my dir and want to count how many files begin with d

Re: Simple file count question

2004-03-15 Thread Uwe Doering
Craig Reyenga wrote: find /path/to/dir -type f -name db\* -print | wc -l would count the number of files that begin with 'db' in the name, under the '/path/to/dir' directory. man find and man wc for more action. Be careful in case that directory contains subdirectories, since 'find' will traverse

Re: Simple file count question

2004-03-15 Thread Craig Reyenga
find /path/to/dir -type f -name db\* -print | wc -l would count the number of files that begin with 'db' in the name, under the '/path/to/dir' directory. man find and man wc for more action. -Craig - Original Message - From: "Dave Carrera" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sen