Please Remove Your Dot Underscore From My Tarball...

Love the Mac.  Love Apple.  Don't like all of the shadow files beginning with ._ that get crammed into a tarball created on the Mac (10.6.6 - and I ran tar from the terminal).

When moving a large site like a Drupal build from a local development server to a production server, tarring the directories up and FTPing is the way to go, but when you get the tarball expanded on the server you soon find a bunch of junk in the newly expanded archives.  Not only is it ugly, but it messes up Drupal as well.  So I tried to remove the files using find along with regex to find the files that begin with ._, but it would seem that there is something special about the dot at the beginning of the filename on our CentOS server, because "^\._.*" fails to match....

After an hour of this joy, it just seemed alot easier to stop fighting the regex battle, and delete what I had, and then re-expand the tarball omitting the dot underscores ._

Here is the command:

$ tar -xf tarballname.tar --exclude="._*"

Problem solved.  Move on.