Re: Identifying files with resource forks
Re: Identifying files with resource forks
- Subject: Re: Identifying files with resource forks
- From: Peter Lovell <email@hidden>
- Date: Fri, 01 Apr 2011 15:01:11 -0400
On Mar 30, 2011, at 5:33 PM, Francis Devereux wrote:
> OS X creates ._ files to store extended attributes as well as resource forks. You can use "xattr -l file" to see whether a file has any extended attributes (files with extended attributes also have an "@" after their permissions in the output of "ls -l") and "xattr -d attr_name file" to delete them.
For the sake of helping others avoid frustration trying to figure out how to create a tarball without the ._ files, I'll mention this solution here.
Mac OS X "tar" uses an environment variable to control whether or not to include the ._ files when creating an archive. Maybe other uses too but I haven't explored those. I've seen comments that suggest that it's also used by "cp"
If you want an archive without them, use ...
COPYFILE_DISABLE=1 tar -czf tarball.tgz <files>
... or ...
export COPYFILE_DISABLE=1
tar -czf tarball.tgz <files>
Cheers.....Peter
p.s. in Tiger and earlier, the variable was called COPY_EXTENDED_ATTRIBUTES_DISABLE
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden