To find and list all hidden files in a directory recursively on a Linux or Unix-like system, you can use the following command:
$ find <directory> -name ".*" -type f
For example, to find all hidden files in the current directory and all of its subdirectories:
$ find . -name ".*" -type f
The find
command searches for files matching the specified criteria and -name ".*"
specifies to look for files whose names start with a dot (i.e. hidden files). The -type f
option restricts the search to only files, not directories.