![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Nov 2003
Location: Olongapo City, Philippines
Posts: 4,618
|
What's a fast way to count the number of html files
and images in a specific directory tree?
On windows or linux.. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Aug 2002
Location: tinyurl.com/5a8cx
Posts: 365
|
search / *.html,*.jpg ?
__________________
tinyurl.com/5a8cx |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 | |
Confirmed User
Industry Role:
Join Date: Nov 2003
Location: Olongapo City, Philippines
Posts: 4,618
|
Quote:
it's giving me "*.html - no such file or directory" |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Industry Role:
Join Date: Jan 2004
Location: Nor'easterland
Posts: 1,914
|
In linux:
find /path/to/root/directory -name *.html | wc -l HTH. HAND. ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Industry Role:
Join Date: Nov 2003
Location: Olongapo City, Philippines
Posts: 4,618
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Confirmed User
Industry Role:
Join Date: Jan 2004
Location: Nor'easterland
Posts: 1,914
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
Too lazy to set a custom title
Join Date: Mar 2004
Posts: 10,579
|
Quote:
__________________
![]()
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Industry Role:
Join Date: Nov 2003
Location: Olongapo City, Philippines
Posts: 4,618
|
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 ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Industry Role:
Join Date: Jan 2005
Location: new york city
Posts: 158
|
cd /path/to/root
find . -name "*.html" -print | wc -l the "." should work, dont forget the quotes "*.html" |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Confirmed User
Industry Role:
Join Date: Jan 2004
Location: Nor'easterland
Posts: 1,914
|
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. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
Confirmed User
Industry Role:
Join Date: Nov 2003
Location: Olongapo City, Philippines
Posts: 4,618
|
Quote:
![]() So.. I just uploaded 2,033 HTML pages and 3,684 jpgs. Search engines love that kind of thing.. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |