Skip to main content
Expanded answer based upon comment
Source Link
Cry Havok
  • 2.1k
  • 14
  • 11

Try:

find /path/to/start/at -type f -print | wc -l

as a starting point., or if you really only want to recurse through the subdirectories of a directory (and skip the files in that top level directory)

find `find /path/to/start/at -mindepth 1 -maxdepth 1 -type d -print` -type f -print | wc -l

Try:

find /path/to/start/at -type f -print | wc -l

as a starting point.

Try:

find /path/to/start/at -type f -print | wc -l

as a starting point, or if you really only want to recurse through the subdirectories of a directory (and skip the files in that top level directory)

find `find /path/to/start/at -mindepth 1 -maxdepth 1 -type d -print` -type f -print | wc -l
Source Link
Cry Havok
  • 2.1k
  • 14
  • 11

Try:

find /path/to/start/at -type f -print | wc -l

as a starting point.