How can I count the number of HTML files in my directories
and subdirectories?
- In UNIX, get into the top directory you want to count.
- Then type in: find . -type f -name '*.html' | wc -l
(wc=word count, l=lines)
- Press enter. The number it gives you will be the number of .html files
in that directory, and its subdirectories.
- Caveat: If you have a symbolic link that goes to a subdirectory, it won't
count the link file or any of the .html files in the subdirectory it sends
you to.
Go to:
Library of Congress
Comments: Ask
a Librarian (
October 18, 2010
)