I have a list of folders and inside every folder I have the file " file.txt" which has the same name in all the folders. I wanted to collect the path for this file from all the folders and save it in a text file. In order to do so, I ran the following command in the parent folder :
find $PWD -type f -name "file.txt" > paths.txt
This command stored all the paths to this file from all the folders, in the file"path.txt " as follow:
a/b/c/1/file.txt a/b/c/2/file.txt a/b/c/3/file.txt a/b/c/4/file.txt a/b/c/5/file.txt a/b/c/6/file.txt a/b/c/7/file.txt . . . .
How can I create space between the lines in the file "path.txt" so it can show as follow:
/a/b/c/1/file.txt /a/b/c/2/file.txt /a/b/c/3/file.txt /a/b/c/4/file.txt /a/b/c/5/file.txt /a/b/c/6/file.txt /a/b/c/7/file.txt ...