title: Linux: 'ls' all jpg files recursively in csv
body: <p>I'm trying to find a way to list all jpg images in all subdirectories and in csv format without the dir name present.</p>
  
  <pre><code>ls -R -1 -m . | grep '.jpg'
  </code></pre>
  
  <p>The ls command does output to csv fine, but the grep command breaks the csv format making each file appear on a new line instead of comma seperated.</p>
  
  <p>I know I can use 'find' to list images but it seems to output the files in a different order than 'ls' and I don't see a output to csv parameter for 'find'</p>
  
  <p>I need the images in each subdirectory on 1 comma seperated line.</p>