Quote:
|
Originally Posted by fusionx
Still here? How can I make this recurse the subdirectories under /path/to/root?
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 
|
This should automatically descend into all subdirectories. For example:
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.