Finding directories without specific file
by johnmb12 from LinuxQuestions.org on (#53G7P)
Have my music on a drive, saved in directories as AAA, BBB, CCC, (thousands of directories,,,) etc with music saved by artist, and each directory should have an m3u (playlist) file. Unfortunately, a number don't, and am looking for an easy way to find which directories, don't.
Have been trying to get the command "find" to work for me, using:
Code:
find . -type d '!' -exec test -e "{}/*.m3u" \; -print
or similar,(stolen from somewhere...), but can't get it to work.
Can anyone straighten me out on this, and/or suggest a simple bash script to do the same..?
Thanks.


Have been trying to get the command "find" to work for me, using:
Code:
find . -type d '!' -exec test -e "{}/*.m3u" \; -print
or similar,(stolen from somewhere...), but can't get it to work.
Can anyone straighten me out on this, and/or suggest a simple bash script to do the same..?
Thanks.