I am using Linux and I want to create a list of files stored in folder and sub-folders with the filenames and their absolute locations concatenated as one string e.g. (/A/B/C/file.ext
)
some modification of:
ls -lR $PWD/* | awk '{printf(" %s/%s\n", ENVIRON["PWD"], $9); }'
to produce output where the PWD "current location" is replaced with the files absolute path.
-not
part? This would exclude hidden files, which wasn't stated by the OP. – bxm Jan 04 '22 at 12:31find
implementations, that can fail to exclude hidden files / dirs whose name is encoded in a charset different from that of the current locale. Note that it still descends into hidden dirs even if it excludes all files in there for output. – Stéphane Chazelas Jan 04 '22 at 15:07