I would like to do something like
ls -RA .?* >> LSRA.list
but with this command and some other variants I tried, I always get also all non-hidden files in the directory where I am.
Namely, if the directory contains files
.hiddenfile foo
with above command I get ther recursive list of both, while I would like to ave only the recursive list of files and directory starting with . (but not the . directory itself!)
I checked answers to this question but I did't find the solution to my problem.
Update: best options found so far:
ls -RA .!(|.)*
and
find -path './.*' -name '.*' -empty -printf %P\\n
the latter recursively list all hidden files in all hidden directory (so if am hidden directory contains a non-hidden files, it does not show that file).
Further update. both answers of bac0n and vanadium work: I cannot accept both! (first one recursively shows nonhidden files in hidden directory, latter one recursively shows only hidden files)