title: How to number the ls output in unix?
body: <p>I am trying to write a file with format - "id file_absolute_path" which basically lists down all the files recursively in a folder and give an identifier to each file listed like 1,2,3,4. </p>
  
  <p>I can get the absolute path of the files recursively using the following command:</p>
  
  <pre><code>ls -d -1 $PWD/**/*/*
  </code></pre>
  
  <p>However, I am unable to give an identifier from the output of the ls command. I am sure this can be done using awk, but can't seem to solve it.</p>