Posts tagged bash

Stop Mac OS X creating hidden files when using the tar command

0

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):

Share

Recursively deleting .svn directories

0

Messing around with your subversion directories and fed up of the .svn hidden folders laying around? If you try and checkin some directories that contain a .svn folder from some other repository, you’re going to have a whole world of pain trying to fix it (speaking from first hand experience here)

The easiest way to clear up rogue .svn directories is to run this command (on linux or mac). It will recursively find all directories named .svn, and pass them in for removal.

Share
Go to Top