Terminal Tip: Delete Those Mac Dot Files

Unzipping/untaring an archive that was created on a Mac can produce a lot of ._blah and .DS_Store files. Rid yourself of them with:

find . \( -name '._*' -o -name '.DS_Store' \) -exec rm {} \;

or, if you’re using GNU find (e.g. on Ubuntu) you can use -delete:

find . \( -name '._*' -o -name '.DS_Store' \) -delete

comment feed And the ensuing discussion…

  1. 1

    Jun 18th, 2009 at 3:14 pm Nick Yeoman

    BLAH, I hate those mac jerks who leave their hidden files in tarballs, awesome tutorial!

  2. 2

    Aug 7th, 2009 at 7:59 am Jason Johnson

    It’s true that it’s annoying, but unfortunately it’s not as simple as just excluding the files from the tar process. Those files don’t exist on the Mac. They are created whenever a file is copied to another file system in order to preserve metadata that the Mac (HFS+) file system supports natively. The tricky thing is, tar creates those files during the archiving. So, --exclude= doesn’t work.

    The solution is to set the COPYFILE_DISABLE environment variable to true, but most users don’t know about it. I didn’t realize it until recently.

  3. 3

    Nov 15th, 2009 at 5:16 am frank

    Is an SD card considered the same as a network volume? if so, this command in your recent discovery might solve problems many music players have with SD cards filled on a mac (they stumble over the . filenames).

    My SD card reader just went bust and I don’t have a new mac with the reader built in so I’ll have to wait to test this.

Comments are closed.

Additional Resources







Recent Instructional Articles

Slicehost (and Linode) LAMP Cheatsheet


A quick list of steps I use to set up a LAMP server on Slicehost or Linode.

Terminal Tip: Prevent Creation of Mac Dot Files


An environment variable can prevent creation of ._filename files.

Terminal Tip: Delete Those Mac Dot Files


Use the find command to delete all of the ._* and .DS_Store files.


Recent Editorial Articles

More Usable Mac: Finder Toolbar


I find it useful to keep a few extra items in my Finder toolbar.

No Multiple-Class Support in IE6


IE6 doesn’t respond to multiple class selectors.

New Skin for the Old Blogish


This blogish is finally back online after an extended period of http silence.


Recent Downloadable Articles



Gitup + Transmit = Really Simple Publishing

Leopard-Style iTerm Icon, Take 2


The newer, bluer version of the iTerm icon.

Leopard-Style iTerm Icon


An updated, Leopard-style icon for iTerm.

About This Site

About the Author

That’s me in the photo above. My current profession is web development. Therefore, it is the subject of this site.


Postpostmodern is the name of this site and my alias on most of the web. There's nothing really special about the name Postpostmodern. I studied art in college during the years after postmodernism, and nobody knew how else to classify the state of things other than silly words like postpostmodernism.

Sorta Blogish

I'd call this a blog, but I don't feel it fits the 'log' format. My goal is to publish articles on web-related topics that interest me, and while some articles may be time-sensitive, I would prefer that the organizational focus be on the categories and tags rather than chronology.

More Me

More about me can be found on the about page. Or, look me up in the usual places: