finding the number of files in each directory
I'm trying to find the number of files in each directory, but I can only get the overall total. My directory structure is as follows: /music/artist/album/song.mp3
I've created a list of each song in each album using... ls -l /music/*/* > music_dump Ultimately, I'd like to know which albums contain 13 songs, but I can't even figure out how to count each album. I've tried piping wc -l to the end, but that returns the total number of all songs. Does not work... ls -l /music/*/* | wc -l Any ideas? |
Not completely accurate, but it's a start without getting complicated. I had to add a hack to treat directory names with single ticks and spaces, you may find that there are other characters the shell does not like.
Code:
#!/bin/sh |
All times are GMT -5. The time now is 09:11 AM. |