3

I'd love to know the syntax within Terminal to export the filename and path of all my music of various types (I have legacy Windows .wma files too). I'd presumably export those file to a .txt or .xls file and sort by path.

My ultimate problem is my music is in many different folders (somewhere between 3 and 10 main places) and contain many duplicates - like 40GB of duplicates. I keep wasting time with software that doesn't work, but if I know where all the music is located (and exactly how big the files are), I can know how to better attack the problem - i.e., maybe I'll just drag them to a Windows machine (via a HD or Dropbox) where their folder merge options work better.

  • You had two questions in here. This site works better when there is only one question per question. That way, it's easier for other people to find solutions if they have the same problem. I've edited out your second question, but feel free to ask it separately. – nohillside Sep 28 '13 at 20:36
2

You might just use find:

find ~/Music > ~/music.txt

Or add for example -iname \*.mp3 to only include files that end with .mp3:

find ~/Music -iname \*.m4a -o -iname \*.mp3 -o -iname \*.flac -o -iname \*.wma > ~/music.txt

If the problem is that your music is scattered throughout your directories and not contained within your ~/Music folder - and if you want to export the paths to a file - then you would want to do this:

find ~/ -iname \*.m4a -o -iname \*.mp3 -o -iname \*.flac -o -iname \*.wma > ~/Desktop/music.txt

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .