Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 3 down vote accepted

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.

share|improve this answer
Ha! -> small test ok -> so, run all the development folder -> good to go ! . . Much appreciated! – brasofilo Jul 9 '12 at 18:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.