VanJohnson.com

random stuff from a digital immigrant
  • Home
  • Linux Stuff

Great Mac tar archive tip

Published by Eric on March 6, 2008 11:49 am under Apple, Geek Stuff, NotMyPosting, Notes, OSX

Every now and then I just post things I don’t want to forget or worried that the original website might disappear. This is one of the cases. This is a blog posting I came across on a little problem that plaques those of us that enjoy using OS X but have a need to move files to other systems like Linux and Windows.

There is a dirty little secret the Mac hides from you when you are using it but becomes a glaring eyesore when you move to another OS. Some file clean up needs to happen because OSX creates these hidden files that start with a ._ which contains some extended information about the file that no other system reads so they aren’t terrible useful when moving files to these systems. This post from a person working for Splunk, outlines how to tar up files on a OSX machine that is targeted for other systems and exclude the ._ files from the tarring process. Original article can be found here

————— POST ———————-

When building Splunk applications, I’m often working on a Mac. There
are files that begin with ._ that are resource files, which contain
extended attribute information about the files for the OS. This is
great and all but I don’t want to include these files when I package up
an application and upload it to SplunkBase.

If you don’t have deep OSX knowledge, then keeping these files out
of your tarball is harder than it looks. One of our OSX gurus pointed
me toward the answer, and I was so excited (yes, I am a geek) that I
just had to share.

To build a tarball in Leopard that doesn’t contain the ._ files, use:

COPYFILE_DISABLE=true tar cvzf filename.tar.gz dirtotar

In Tiger, use:

COPY_EXTENDED_ATTRIBUTES_DISABLE=true tar czvf filename.tar.gz dirtotar

This is definitely going in my .bashrc so I don’t have to fuss with it again:

export COPYFILE_DISABLE=true

————— PEND OF POST ———————-

No Comment

Comments are closed.

Posting your comment.

  • My Twitter...

    • Any now I understand the metric system http://xkcd.com/526/ 5 hrs ago
    • @jawhitmoyer Because the world is interested in what goes on in the @jawhitmoyer world. :-) in reply to jawhitmoyer 6 hrs ago
    • Back in the trenches and back to work... 13 hrs ago
    • I imagine the "web browser" will always be around in some form or fashion but I am curious if we will recognize it in say 10 more years. 22 hrs ago
    • Hoping my backups can save me for a second time in a week (unrelated issues). 1 day ago
    • More updates...
  • RSS Interesting Items

    • DRM is always anti-userOpen Source News
    • Linux Virus: A False Sense Of SecurityOpen Source News
    • Nokia eyes wider use of Linux software in phones (Reuters)Open Source News
    • New OS Reaches for the Clouds (PC World)Open Source News
    • Open-source Developers Set out Software Road Map for 2020 (PC World)Open Source News
    • See Linux Running on the iPhone (PC World)Open Source News
    • Unconstitutional Law Cannot Shut Courthouse Door on Americans' Privacy ClaimsOpen Source News
    • Former Microsoft Employee Publishes Book Advocating Free SoftwareOpen Source News
    • See Linux Running on the iPhone (PC World)Open Source News
    • Shred and secure-delete: tools for wiping files, partitions and disks in GNU/LinuxOpen Source News
  • Pages

    • Linux Stuff
      • Linux CLI (Level 1)
      • Linux CLI (Level 2)
      • Linux Links
        • Great Linux Links
        • Live CDs
      • VI commands
  • Categories

    • Family
      • My Cancer
    • Funny
    • Geek Stuff
      • Apple
        • OSX
      • Firefox
      • Google
      • Linux
        • Ubuntu
      • Networking
      • Notes
      • Perl
      • PHP
        • PEAR
    • General
    • GTD
    • Just Really Cool
    • Microsoft
    • mysql
    • NotMyPosting
    • Open Source
    • QuickTip
    • Rant
    • Sony
    • Video
  • Recent Posts

    • Internet Famous with Splunk
    • Caution Implementing Open Source
    • Killing IM with killall and taskkill
    • Air Trees
    • Dropbox Client for Linux
  • Links

    • Kirkwood.net
    • Photos
  • Links for Geeks

    • PHP.net
    • Shocm - Geek Stuff
  • Links Offsite

    • eSolves
    • SDABL
  • Archives

Copyright © 2009 VanJohnson.com