Searching for the issue, I found this Q&A:
How can I show only an .htaccess file in the Finder?

[...] you could create a symlink to the file in its directory, omitting the dot in the name:

  1. open Terminal, cd into your folder
  2. ln -s $PWD/.htaccess $PWD/htaccess

Is there some kind of terminal batch to search for all .htaccess files inside a folder (i.e.: /public_html) and apply the symlink?

Or would it be a combination of Automator and Terminal?

1 Answer 1


Change to the initial directory (public_html in the question) and run

find . -name '.htaccess' -print | while read f; do
    ln -s "$PWD/$f" "$PWD/${f//.htaccess}htaccess"

PS: I did some rudimentary testing but please make a backup before you run it anyway.

  • Ha! -> small test ok -> so, run all the development folder -> good to go ! . . Much appreciated!
    – brasofilo
    Commented Jul 9, 2012 at 18:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .