Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • way too recursive... I only want to see the top level, where it totals everything underneath it. totaled... this ends up printing every directory. Commented Nov 16, 2010 at 21:05
  • @xenoterracide: Try adding -maxdepth 1 immediately after the first find. If you want to include the number of subdirectories in your count, remove the -type f at the end (that should have really been ! -type d anyway, so that all non-directory files would have been included). Commented Nov 16, 2010 at 23:15