I was looking for a way to show only hidden files (files with names preceded by a period) when I use the ls command, and I came across the solution today. Of course, we all know how to show hidden files like this:


“ls -a” or
“ls -all”

BUT WAIT! Can’t we show ONLY hidden files? Well, my friend, if that’s what you’re looking for, then you’ve come to the right place. Let me show you how:


ls -ld .??*

Yep, it appears that it’s really that simple. Hope this helps someone else who’s needing to find two simple hidden files in a folder with over 1,900 high quality digital images of a candy factory. Or something like that.

13 Responses to “List only hidden files with “ls” command in Terminal”

Leave a Reply