I want to compress my entire music collection (a copy of it, actually) using lame. So naturally, there are folders within folders and possible weird characters in file names. I used the graphical soundconverter as well, but didn't like it as it has predefined bit rates.
What I've tried so far:
$ find . -name "*.mp3" | lame -b 160
and
$ find . -name "*.mp3" > list
$ cat list | lame -b 160
and
$ lame -b 160 < list
All of these give me usage error. What is the right way to do it? Also, if there's a way to overwrite the original file, I'll be too happy.
cat $file | $programis equivalent to$program <$file, except for the unnecessarycatinvocation (and the overhead associated with kicking off an extra process, etc). In general, you should avoid the first form.find . | $programis similarly preferable tofind . >$file; $program <$file;in that it avoids creating an unnecessary file, unless you'll be reusing the list, in which case it might be preferable to write it out to a file first. – Blacklight Shining Apr 19 '15 at 15:03