I need to generate a listing of file paths that match a string. Take the following folder structure:
So as you can see, file names and folder names are not unique within the folder structure, but are unique by folder/file path. However, the listing it generates is broken up by folder structure:
Notice how the result is broken up. I'm looking for a way to produce output that is 1 file/folder per line only (no additional information). All I would like to see is this:
Hopefully that makes sense.
Code:
myfolder mysubfolder1 123456.dat (this is a file) 123456 (this is a folder) 654321.dat 654321 mysubfolder2 123456.dat (this is a file) 123456 (this is a folder) 654321.dat 654321
So as you can see, file names and folder names are not unique within the folder structure, but are unique by folder/file path. However, the listing it generates is broken up by folder structure:
Code:
ls -1lAR /myfolder > /a-qsh-output.txt
Code:
/myfolder/mysubfolder1: total: 391 kilobytes drwxrwxrwx 2 NFSUSER NFSGROUP 64 Mar 23 13:33 123456 -rwxrwxrwx 1 NFSUSER NFSGROUP 589 Feb 25 06:30 123456.dat /myfolder/mysubfolder1/123456: total: 31kilobytes -rwxrwxrwx 1 NFSUSER NFSGROUP 589 Feb 25 06:30 00001.pdf /myfolder/mysubfolder2: total: 32 kilobytes drwxrwxrwx 2 NFSUSER NFSGROUP 64 Mar 23 13:33 123456 -rwxrwxrwx 1 NFSUSER NFSGROUP 589 Feb 25 06:30 123456.dat /myfolder/mysubfolder2/123456: total: 31kilobytes -rwxrwxrwx 1 NFSUSER NFSGROUP 589 Feb 25 06:30 00001.pdf
Code:
/myfolder/mysubfolder1/123456.dat /myfolder/mysubfolder1/123456/00001.pdf /myfolder/mysubfolder2/123456.dat /myfolder/mysubfolder2/123456/00001.pdf
Comment