Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to unhide all the .htaccess files in my home folder. Below I've pasted what I'm using now, but it isn't working.

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

Anyone knows why it keeps giving me errors that the file does not exists?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Changing the hidden/nohidden flags on a dotfile isn't going to make it appear. Finder always hides dotfiles, unless you set the AppleShowAllFiles property:

defaults write com.apple.finder AppleShowAllFiles -bool true
osascript -e 'quit app "Finder"'

That, however, will make all hidden files appear.

As for the errors you're getting, it's hard to tell. Not that it's going to make a difference because the files will still be hidden, but maybe try find ~ -iname '.htaccess' -exec chflags nohidden {} \;.

share|improve this answer
    
I know that one, but since I have a lot of .files and .dirs, it makes a mess of my finder. –  jeroenvisser101 Nov 9 '13 at 10:59
    
Unfortunately, it's not possible. You could maybe symlink the .htaccess files to htaccess ones that would be always visible. –  slhck Nov 9 '13 at 11:01
    
That's a shame actually, I will except your answer as it's closest as you could be :) Thanks! –  jeroenvisser101 Nov 10 '13 at 10:56

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.