As mentioned in the title, Mac OS X doesn't allow me to name files starting with a dot ( . ). But, I need an .htaccess file. Or, better, how do I use an htaccess file in Mac OS X without giving it a name starting with a dot?
I am running Mac OS 10.5.8 and XAMPP 1.7.3.
In Finder, open up your Macintosh HD folder. Press Command+Shift+Dot. Your hidden files will become visible.
. _ files are created automatically by Mac OS X and contain metadata related to the accompanying file that was placed there by programs in the Mac.
The names of files and folders in Mac OS X can use almost any character out of thousands of Unicode characters, which include symbols, arrows, and icons as well. There are only two characters you can't use: one is the colon (because it's used by the system).
You can't do this with the Finder. Open Terminal.app (Applications -> Utilities -> Terminal
), and type:
> cd /path/to/directory/containing/htaccess > mv current_file_name .htaccess
Example (do not take directory names or initial filename literally, of course):
You can create files that begin with a "." if you can view hidden files.
Enter the following commands to show hidden files:
defaults write com.apple.finder AppleShowAllFiles -bool YES killall Finder
When you're done enter these commands to hide them again:
defaults write com.apple.finder AppleShowAllFiles -bool NO killall Finder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With