How to Show Only Hidden Files in Mac Terminal

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.

Has this been helpful to you?

You can support my work by sharing this article with others, or perhaps buy me a cup of coffee 😊


Share & Discuss on