Operating System - HP-UX
1758560 Members
1686 Online
108872 Solutions
New Discussion юеВ

How to check how files under folder

 
SOLVED
Go to solution
Johnson Punniyalingam
Honored Contributor

How to check how files under folder

Hi Friends,

could any help me to find how to check how file are under the below

/PRD/SAP/edms/LOTUS_MAILS

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
8 REPLIES 8
Johnson Punniyalingam
Honored Contributor

Re: How to check how files under folder

how to check how many file under folder,

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
Ganesan R
Honored Contributor
Solution

Re: How to check how files under folder

Hi Johnson,

#ll |wc -l
Best wishes,

Ganesh.
Prashanth Waugh
Esteemed Contributor

Re: How to check how files under folder

Hi,

find /home/w01/ -type f -exec ls -ld {} \; | wc -l

Regards
Prashnat
For success, attitude is equally as important as ability
Johnson Punniyalingam
Honored Contributor

Re: How to check how files under folder

My mind was bit rusted, never follow the basics,

Many Many Thanks Guys, for your support,

Rgds,
Johnson
Problems are common to all, but attitude makes the difference
Johnson Punniyalingam
Honored Contributor

Re: How to check how files under folder

My mind was bit rusted, never follow the basics,

Many Many Thanks Guys, for your support,

Rgds,
Johnson
Problems are common to all, but attitude makes the difference
Dennis Handly
Acclaimed Contributor

Re: How to check how files under folder

>Prashnat: find /home/w01/ -type f -exec ls -ld {} \; | wc -l

If just counting, you probably don't want to use ll, just ls -d:
find /home/w01/ -type f -exec ls -d {} + | wc
Michael Mike Reaser
Valued Contributor

Re: How to check how files under folder

Dennis> If just counting, you probably don't want to use ll, just ls -d:
find /home/w01/ -type f -exec ls -d {} + | wc

OK, maybe I'm just being dense here (and, as you might remember, Dennis, I can be Dense As Lead), but why bother with the "- exec ls -d" stuff? Since there's a "-type f" on the find, isn't the ls superfluous?
There's no place like 127.0.0.1

HP-Server-Literate since 1979
Dennis Handly
Acclaimed Contributor

Re: How to check how files under folder

>Mike: but why bother with the "-exec"

You're exactly right. Just count the find output.