Skip to main content
added 247 characters in body
Source Link
enzotib
  • 53.4k
  • 14
  • 126
  • 106

If using GNU find, you can do

find /path -path '*/.*' -ls | tee output-file

Edit

To avoid to show non-hidden items contained in hidden directories

find /path -name '.*' >output-file

(as noted, tee could be avoided if you do not need to see the output, and -ls option should be used only if required).

If using GNU find, you can do

find /path -path '*/.*' -ls | tee output-file

If using GNU find, you can do

find /path -path '*/.*' -ls | tee output-file

Edit

To avoid to show non-hidden items contained in hidden directories

find /path -name '.*' >output-file

(as noted, tee could be avoided if you do not need to see the output, and -ls option should be used only if required).

Source Link
enzotib
  • 53.4k
  • 14
  • 126
  • 106

If using GNU find, you can do

find /path -path '*/.*' -ls | tee output-file