- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Count number of files command
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 08:18 AM
04-17-2001 08:18 AM
this is where all the sendmail user files are stored. I is there a count command that I can run that tells me how many files i have in that dir ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 08:24 AM
04-17-2001 08:24 AM
Re: Count number of files command
Try:
ll /var/sendmail|wc -l
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 08:25 AM
04-17-2001 08:25 AM
Re: Count number of files command
cd /var/sendmail
find . -type f | wc -l
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 08:27 AM
04-17-2001 08:27 AM
Re: Count number of files command
find . | nl | tail -n 1 | awk '{ print $1 }'
should do it. I do not know if there is an upper limit for the "nl" program. This might be the only problem.
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 08:27 AM
04-17-2001 08:27 AM
Re: Count number of files command
Try ll?wc -l
But if you think you have so many , you will not be able to count them like that (exeeds ....) you will have to use xargs also
Good luck
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 08:28 AM
04-17-2001 08:28 AM
Re: Count number of files command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 08:34 AM
04-17-2001 08:34 AM
Re: Count number of files command
sits there
# find . -type f | wc -l
Gives me 989
# find . | nl | tail -n 1 | awk '{ print $1 }'
Gives me 996
# wc -l
sits there
# ls /var/mail |wc -l
Gives me 967
-------------
Why am I getting a differnt count every time? maybe one is counting a sub dir and the files in the sub dir?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 08:53 AM
04-17-2001 08:53 AM
Re: Count number of files command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 09:02 AM
04-17-2001 09:02 AM
Re: Count number of files command
...jcd...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 11:12 AM
04-17-2001 11:12 AM
Re: Count number of files command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2001 11:39 AM