2

I wanted to see the .htaccess files on my Mac (in the Finder). So I enabled the ShowAllFiles from the Terminal.

defaults write com.apple.Finder AppleShowAllFiles YES

It works like expected but the downside is that I'm seeing all the .DS_Store and .localized files.

Is there a way to only show the files named .htaccess (and possibly a few more in the future) ?

Vallieres
  • 859
  • 7
  • 19

1 Answers1

0

A colleague suggested to leave the files hidden and use the chflags command to show only the files I want.

chflags nohidden .htaccess

Or recursively in my development folder:

find ~/ -iname ".htaccess" | xargs chflags nohidden "{}"

Hope it helps you guys like it helped me!

Vallieres
  • 859
  • 7
  • 19
  • This won't actually work. The Finder hides files if they have the hidden flag set **OR** if they are dotfiles. You can't override their being dotfiles by clearing the hidden flag - it's not even set on them to begin with. –  Dec 20 '13 at 19:27