Mac OS X
Last week I found something quite frustrating with the tar command on Mac OS X, it likes to put hidden files into archives when you tar them up, it doesn’t give you any warning, just does it.
Creating a tar, and then having a look at its contents, you’ll see something like this :
JamesMac:staging-area JElsey$ tar -tf MyApplication.tar.gz src/ src/._MyApplication.cmd src/MyApplication.cmd src/._MyApplication.properties src/MyApplication.properties src/lib/ src/lib/._anExternalJar.jar src/lib/anExternalJar.jar
Notice the files prefixed with “._”.
You can quite easily stop this, by setting the following environment variable (I prefer to set this up in the bashrc_profile):
Frustrated, that I recently couldn’t find my maven settings.xml file because the Mac OS X Finder doesn’t show hidden files by default, I found that the following can correct that
- Open a terminal
- Type this : defaults write com.apple.finder AppleShowAllFiles TRUE
- Kill any open finder sessions by typing (note the capital F) : killall Finder
- Re open the Finder, and you should now be able to see hidden files.
You can also reverse the above by changing TRUE to FALSE.
Hope this helps