I want to know how many files I have on my filesystem. I know I can do something like this:
find / -type f | wc -l
This seems highly inefficient. What I'd really like is to do is find the total number of unique inodes that are considered a 'file'.
Is there a better way?
I would like to do this because I am developing a file synchronization program, and I would like to do some statistical analysis (like how many files the average user has total vs how many files are on the system). I don't, however, need to know anything about those files, just that they exist (paths don't matter at all). I would especially like to know this info for each mounted filesystem (and it's associated mount point).