palordrolap,

The find command could be your friend for getting a full depth count. Something like:

find /path/name/here/ | wc -l

Or just:

find . | wc -l

for the current directory.

There's also a command called locate (often with another letter in front, but accessible by just that word) which maintains a database of filenames on a system that can be used, provided it's installed and has built that database.

Pro: Faster than churning the disk every time with find. (Though disk cache can help alleviate some of this).

Cons: Can get out of date with a changing filesystem. Harder to search for relative paths like .

locate -r '^/path/name/here/' | wc -l

... would be roughly equivalent to the first find example.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • fightinggames
  • All magazines