I am using the find command to find files of a certain type recursevely in subdirectories. I am trying to send the output from the 'find' command to a text file. However the long file paths returned get split onto multiple lines. I would like to output each file path on a single line.
The command I am using is something like
find /path/to/directories -name *.cdf > filelist.txt
the output I get looks like:
/path/to/directories/directory1/subdir
ectory1/file1.cdf
/path/to/directories/directory1/subdir
ectory1/file2.cdf
/path/to/directories/directory2/subdir
ectory2/file3.cdf
I want my output file to look like:
/path/to/directories/directory1/subdirectory1/file1.cdf
/path/to/directories/directory1/subdirectory2/file2.cdf
/path/to/directories/directory2/subdirectory1/file3.cdf
Any help on how to accomplish this would be much appreciated.
Thanks
No comments:
Post a Comment