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.

Required fields*

5
  • yeah but this only does 1 directory.... I'd like to get the count for all directories in a directory, and I don't want to run it seperately each time... of course I suppose I could use a loop... but I'm being lazy. Commented Nov 16, 2010 at 12:49
  • 1
    find works recursively through all sub directories by default. If you want it to work in multiple locations, you can specify all of them between find and -type. Commented Nov 16, 2010 at 14:33
  • that second one certainly doesn't work.... I tried it on /home . I got 698035 . I should see about 6 numbers. Commented Nov 16, 2010 at 21:02
  • It works for me - are you sure you only have 6 files under /home? I'd be 100% certain you don't. Commented Nov 17, 2010 at 17:28
  • @Cry I have maybe 6 directories... not 6 files Commented Nov 18, 2010 at 7:51