Click to See Complete Forum and Search --> : file count


happybunny
04-14-2004, 10:48 PM
I'm not sure even how to search for this so I thought I'd post here while i figure it out hoping for an answer:


I have an mp3 folder, that has 50 other folders in it, with files. Some with even more foldes under the folders folder.

how can I do a file count to see how many actual files I have from /mp3s all the way down the tree? hopefuly without counting the folders too.

Thanks...as the search continues....

happybunny
04-14-2004, 10:56 PM
think i got it:

ls -Rl | wc -l

list -recursice long piped to word count line option.

finally got the right combination of words in google search!!!

JohnT
04-14-2004, 11:41 PM
Good for you...someone that actually know where google is.:p

happybunny
04-15-2004, 08:08 AM
i agree that people should google more than they do, but i couldnt get the right combination of words...i kept getting "how many files per folder does linux support"...plus is was midnight.

ph34r
04-15-2004, 09:01 AM
cd /place/with/mp3s
find ./ -iname *.mp3 | wc -l