tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* counting the number of files under an entire directory tree
@ 2005-05-26 17:01 kdea
  2005-05-26 17:20 ` [SUMMARY] " kdea
  0 siblings, 1 reply; 2+ messages in thread
From: kdea @ 2005-05-26 17:01 UTC (permalink / raw)


Hi Managers,

We have a directory with a huge number of directories and subdirectories,
sub-subdirectories, and files.  Does anyone know a command or a series of
piped commands (presumably including 'wc') to count exactly the number of
files and directories under a specific directory?

ES40 running Tru64 5.1a.

Thank in advance,

Kevin

--
Kevin Dea
UNIX System Administrator
Alpine Electronics Research of America




^ permalink raw reply	[flat|nested] 2+ messages in thread

* [SUMMARY] counting the number of files under an entire directory tree
  2005-05-26 17:01 counting the number of files under an entire directory tree kdea
@ 2005-05-26 17:20 ` kdea
  0 siblings, 0 replies; 2+ messages in thread
From: kdea @ 2005-05-26 17:20 UTC (permalink / raw)



Wow,

Less than 5 minutes and got several replies.  The simpliest which I needed,
to count EVERYTHING under a directory was to use:  find <directory> | wc -l

There are other ways to only count symlinks, directories, or files using
'find'.  For example only looking for files, use:  find /usr -type f | wc
-l

Thanks to everyone who replied with the answers!

Kevin



---original question---

We have a directory with a huge number of directories and subdirectories,
sub-subdirectories, and files.  Does anyone know a command or a series of
piped commands (presumably including 'wc') to count exactly the number of
files and directories under a specific directory?

ES40 running Tru64 5.1a.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-05-26 17:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-26 17:01 counting the number of files under an entire directory tree kdea
2005-05-26 17:20 ` [SUMMARY] " kdea

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox