There are certain things that aren’t so simple for Mac OS users. At times we need to Create a file starting with “.” dot in Apple Mac OS for certain development purpose. ex. .htaccess files which are widely famous in Web Developers working on Linux.

You can create files that begin with a “.” in Mac OS if you can view hidden files.

Enter the following commands to show hidden files:

defaults write AppleShowAllFiles -bool YES
killall Finder

When you’re done enter these commands to hide them again:

defaults write AppleShowAllFiles -bool NO
killall Finder

Hope this helps.