I want to list all hidden files and directories and then save result to file.
Is there any command for this?
If using GNU find, you can do
To avoid to show non-hidden items contained in hidden directories
To list the hidden files and directories in the current directory, including
To list the hidden files and directories in the current directory and its subdirectories recursively:
If you want to save the results to a file, use a redirection:
To include non-hidden files in hidden directories: