Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Re: File Count using Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Re: File Count using Terminal
Authored by: sjk on Apr 11, '02 04:56:27PM
Sorry, trivial examples disprove that. The default style for ls is one-entry-per-line when output isn't sent to the terminal and you can force that using the -1 (minus one) option; read the man page. Also look at -A, noting the difference between it and -a.

A fast way to count files is by utilizing the locate command. Simple example to count one user's files:

locate /Users/me/ | wc -l

See my comment in Finding files with 'locate' about locate.db permission issues which affect results of this.


[ Reply to This | # ]