Someone said to me use the find
command but I'm not exactly sure how to do it.
Basically I need this:
suppose I have a folder called dir1
and it contains three sub-directories (dir2
, dir3
and dir4
respectively) and suppose there might be mp3 files in all of the aforementioned directories. I would like to run a terminal command on dir1 that would search recursively through all the folders and list full paths of where it finds mp3 files. I need the full paths so that I know exactly where they were found.
Output should look something like this:
/Users/joeschomoe/dir1/Daft Punk - Around The World.mp3
/Users/joeschomoe/dir1/dir2/Jimi Hendrix - All Along The Watchtower.mp3
/Users/joeschomoe/dir1/dir2/Jimi Hendrix - Purple Haze.mp3
/Users/joeschomoe/dir1/dir3/Rolling Stones - Gimme Shelter.mp3
/Users/joeschomoe/dir1/dir4/Simon and Garfunkel - The Boxer.mp3
Would anyone know how to do this with find
or some other Unix command I'm not aware of?
Any help would be gladly appreciated in advance. Thanks.