Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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
add comment

1 Answer

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"
done

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
add comment

Your Answer

 
discard

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.