- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- file count
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
Discussions
Discussions
Forums
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
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
тАО09-07-2000 12:42 AM
тАО09-07-2000 12:42 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2000 12:45 AM
тАО09-07-2000 12:45 AM
Re: file count
du / -a | wc -l
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2000 12:49 AM
тАО09-07-2000 12:49 AM
Re: file count
ls -R | wc -l
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2000 12:56 AM
тАО09-07-2000 12:56 AM
Re: file count
to avoid for du walking thru NFS use:
du -t hfs -t vxfs -a / | wc -l
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2000 01:24 AM
тАО09-07-2000 01:24 AM
Re: file count
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2000 01:26 AM
тАО09-07-2000 01:26 AM
Re: file count
The previous replies are good if you just want to find how many files and directories exist.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2000 01:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2000 02:09 AM
тАО09-07-2000 02:09 AM
Re: file count
Andy's solution is indeed the best and the quickest.
To calculate the total number of files on all mounted file systems:
-------------------
total_files=0
set $(bdf -i)
shift 10
while [ $# -gt 1 ]
do
let total_files=$total_files+$6
shift 9
done
print $total_files
----------------------
Hope this helps,
Rik.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2000 07:18 AM
тАО09-07-2000 07:18 AM
Re: file count
TO count total number of files on all mounted local file systems run following script:
total_files=0
for number in `bdf -il | grep -v Filesystem | awk '{print $6}'`
do
total_files=`expr $total_files + $number`
done
echo $total_files
Regards.
Punjabhai V Patel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-08-2000 08:18 PM
тАО09-08-2000 08:18 PM
Re: file count
find / | wc -l
reember though in most of the methods you will be counting . and ..
But in find you could do somthing like
find . | grep -v ". " | grep -v ".. " | wc -l
and if you didnt want nfs dir's you can add this as an option to find