I am trying to write a file with the format - "id file_absolute_path", which basically lists all the files recursively in the folder and gives an identifier to each file specified as 1,2,3,4.
I can get the absolute file path recursively using the following command:
ls -d -1 $PWD/**/*/*
However, I cannot give the identifier from the output of the ls command. I am sure that this can be done with awk, but it seems it cannot solve it.
source
share