December 19th, 2008
List only hidden files with “ls” command in Terminal
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:
CODE:
“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:
CODE:
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.
March 23rd, 2010 at 10:16 am
Thanks!