![]() |
What's a fast way to count the number of html files
and images in a specific directory tree?
On windows or linux.. |
search / *.html,*.jpg ?
|
Quote:
it's giving me "*.html - no such file or directory" |
In linux:
find /path/to/root/directory -name *.html | wc -l HTH. HAND. :thumbsup |
Quote:
|
Quote:
|
Quote:
|
Quote:
I tried using -mindepth 3 and it didn't seem to make any difference. I've got 98 subdirs and don't want to cd and run this in all of them :) |
cd /path/to/root
find . -name "*.html" -print | wc -l the "." should work, dont forget the quotes "*.html" |
Quote:
find /usr -name *jpg | less yields: /usr/share/gtk-2.0/demo/background.jpg /usr/share/doc/pygtk2-2.4.0/examples/pygtk-demo/demos/images/background.jpg /usr/share/doc/mod_perl-1.99_16/docs/user/handlers/filter_life_shower.jpg /usr/share/doc/mod_perl-1.99_16/docs/user/handlers/filter_life_player.jpg /usr/share/doc/mod_perl-1.99_16/docs/user/handlers/filter_life_goggles.jpg /usr/share/doc/mod_perl-1.99_16/docs/user/handlers/filter_life_mask.jpg ..etc... Notice that the root was /usr. It'll find everything underneath... additionally, you can run the command from anywhere. If you need to count the files instead of seeing them, just pipe the output through 'wc -l' (word count, linecount only). HTH. |
Quote:
So.. I just uploaded 2,033 HTML pages and 3,684 jpgs. Search engines love that kind of thing.. |
All times are GMT -7. The time now is 03:59 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123