To show only hidden files inside a specific directory, open your Mac Terminal and run this command:
ls -ld .*
-l
means use list format-d
, means list directory entries instead of contents.*
means only show hidden files
If you don’t want to include extra metadata such as username and dates, you can run this command instead:
ls -d .[!.]*
This will give you a cleaner output.