I have a directory that contains so many sub directories and files in them. I would like to create a file which provides each file name and it's source directory path information
I have a folder name sample which contains sample1 and sample2 sub directories in it.
ex2.csv in sample 1 and
ex4.csv in sample 2 directory.
I need to create a text file (or) CSV file which gives the information in the following manner.
ex1.csv,sample/sample1 ex2.csv,sample/sample1 ex3.csv,sample/sample2
It would be great if someone help me out to create the script file in UNIX.
$ find sample -type f -printf '%f,%h\n'
As I am using Solaris it is not allowing me to use
printf and I don't have access to install other utilities.