What are these __MACOSX folders I keep seeing in zip files made by people on OSX? Some take as much as 30% of the file.
What program are producing these __MACOSX folder and how can mac users avoid this mistake?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityWhat are these __MACOSX folders I keep seeing in zip files made by people on OSX? Some take as much as 30% of the file.
What program are producing these __MACOSX folder and how can mac users avoid this mistake?
Apple provides built-in capability to ZIP files in OS X 10.3 and higher, and these files are the result of Apple storing Resource Forks safe manner. You would never see these files running OS X 10.3 or higher, but since Windows and other operating systems do not understand this special form of Resource Forks they will appear as you see them.
unzip filename.zip
will unpack the __MACOSX/ directory, which you don't want, but open filename.zip
will do the right thing.
– Edward Falk
Jun 22 '16 at 18:40
Here's a link that explains it pretty well. I suppose it is a bit late to help Yada, but for posterity.
Explanation of resource fork at Wikipedia
The rest is my opinion:
@nickf: Never seeing these files is not a FEATURE of those OS X versions it is a FLAW.
People produce data, wrap it up, store it on different mediums and so on. They need to know what is needed or what is not needed. Hiding it keeps them in the dark.
The age old bad idea of hiding things from users:
A programmer, concerned with expediency of accomplishing his/her own work, abuses something in the domain of the end user, to make it easy for himself/herself.
In this case he/she stored meta data in the user's data space, he/she then hid it from the user. He/she missed the big picture: The user won't become aware of the hidden details. When he/she packages his/her data and ships it somewhere unanticipated by the programmer, missing parts won't get shipped or unknown parts will arrive which neither the user nor the recipient can explain.
Hiding things from the user is bad.
It assumes the user is stupid, when more accurately it is the programmer being stupid, or lazy.
To be clear, this bad habit is not confined to MAC. It is everywhere. It's a consequence of programmers falling in love with their own schemes and vendors prioritizing their own goals ahead of the needs of the end user.
In brief.
__MACOSX:
weird smelling programmer droppings emerging from under the rug where they were swept.
Programmers and vendors: Please keep things in the open. When you hide them, you make yourself stupid and the user uninformed.
To answer your final question:
how can mac users avoid this mistake?
macOS users can install a 3rd-party archiving utility like Keka, then tell it to not use Resource Forks, then set it as the default compressor.
zip -d
will remove the resource forks from a zipfile. In fact, I think if you use zip in the first place, the resource forks don't get added in the first place.
– Edward Falk
Jun 22 '16 at 18:44
zip -d filename.zip __MACOSX/\*
– Chris Johnson Dec 2 '12 at 1:31