Annoying ._ (dot underscore) files

On August 21, 2010, in Mac, Mac Top Tips, Terminal, by Steve

I have in the past found a little annoying trait when decompressing files to a Linux box that have been compressed (zipped or tarred) on one of my Macs. Every file is duplicated and prefixed with ._

In the past it has only been a few files, no more than 50 or so which didn’t pose a great problem but today I have uncompressed a file with over 4000 files in it… and yes they were all duplicated. This makes a mess of the files structure.

I decided to research the issue and find away of preventing this from happening. I came across this post on Jim Plush’s blog.

By using the following command when decompressing will prevent the dot underscore files being added to the Linux box.

tar -zxpvf mytarfile.tgz ––exclude=”._*.*”

Let me know if anyone finds something else or has any issues / success with this.

EDIT,

Aside from the above, which seems to be failing and the issue has not gone away with prayer so I have been on the case this morning and have found a working solution.

tar zxpf test.tar ––exclude ._*

It seems that missing the speech marks from the file name and removing the equals has done the trick.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Live
  • MySpace
  • StumbleUpon
  • Technorati
  • Twitter
  • Yahoo! Buzz
  • Ping.fm
  • RSS
Tagged with:  

6 Responses to “Annoying ._ (dot underscore) files”

  1. Sahus Pilwal says:

    I noticed an error in the tarball syntax above. It should be;

    tar -xzpvf mytarfile.tgz –exclude=”._*”

    DOUBLE DASH before the word “exclude”… ;)

    Thanks for the post though it was most helpful!!!

    • Steve says:

      Hey

      Thanks for noticing this. There is a double hyphen there but only shows as one on the page…odd.

      Fixed it by using the html for the hyphen,

      I will be posting some other commands soon. I have just been using “history” which is saving a lot of time.

      Your website looks good too :)

      Steve

  2. Leslie says:

    Great post, thanks

  3. Michael says:

    I am new to mac and I’ve learned a lot from your blog here. Keep on going.

  4. Steve says:

    I’ve added an edit to the above post.

  5. roseanne says:

    Pretty good post. I just stumbled upon your blog and wanted to say that I have quite enjoyed reading your blog posts. Any way I will be subscribing to your feed and I hope you article again soon.

Leave a Reply

Free WordPress Theme
Can't find what you are looking for? Need help on a topic or find something thats not right let me know
WordPress Blog