Rixstep
 About | ACP | Buy | Industry Watch | Learning Curve | News | Products | Search | Substack
Home » Learning Curve

^PkgInfo$ – Do the Math

Every screen dump tells a story.


Get It

Try It

Why not look closer at this? We never use the critters. Hopefully others won't either. They're as distracting as .DS_Store. And cater to the same culprit too.

How many PkgInfo files in an entire Mojave system? Let's let Xscan figure it out.



Xscan is run at root and as root. The scan takes but a minute or so. The results?



499 files. So OK let's do the math.

As can be seen here, PkgInfo takes but 8 bytes. PkgInfo files always take 8 bytes. Why? Because they contain two 4-byte fields: a file type field and a creator code field - the 'old Macintosh way'. Something that walked out the door twenty-five years ago.



The PkgInfo for the above application 'App Store'?

'APPL????'

Meaning it's not really used. The 'APPL' (standing for 'application' and not 'Apple') is found in the bundle's Info.plist - this is the value that governs.

<key>CFBundlePackageType</key>
<string>APPL</string>

The '????' means the application doesn't have a creator code. 'As if': with so few values available - Apple co-opt half of them from the get-go - there aren't enough to go round. So they're never used.

Meaning that of the 8 bytes we thought we were using, we're only using 4 - half.

Meaning the device is antiquated. Got whiskers longer than Gabby Hayes.

And yet the files remain, generated by your trusty friend Xcode.

Why? They're obviously not needed. So why? Anyone?

Arno?

But OK, let's do some more math. Again, from the first graphic above, we can see that the minimum allocation block (cluster) is 4096 bytes (8 sectors). This means - you're following this, right? - that each 8-byte PkgInfo file, which really only uses half of those 8 bytes anyway, is actually consuming 4096 bytes (4 KB) on disk. In your filesystem.

So OK, now how many PkgInfo files did we encounter? Keep in mind that this is a pristine system: you're likely to have many many more. Those 499 files essentially represent a bare naked Mojave. More or less.

Using Apple's trusty Calculator.app, the rest is easy.











So hey, OK, it's only 1.94921875 megabytes.

No big deal.

Arno? Hi! Can you come in here a sec?

About Rixstep

Stockholm/London-based Rixstep are a constellation of programmers and support staff from Radsoft Laboratories who tired of Windows vulnerabilities, Linux driver issues, and cursing x86 hardware all day long. Rixstep have many years of experience behind their efforts, with teaching and consulting credentials from the likes of British Aerospace, General Electric, Lockheed Martin, Lloyds TSB, SAAB Defence Systems, British Broadcasting Corporation, Barclays Bank, IBM, Microsoft, and Sony/Ericsson.

Rixstep and Radsoft products are or have been in use by Sweden's Royal Mail, Sony/Ericsson, the US Department of Defense, the offices of the US Supreme Court, the Government of Western Australia, the German Federal Police, Verizon Wireless, Los Alamos National Laboratory, Microsoft Corporation, the New York Times, Apple Inc, Oxford University, and hundreds of research institutes around the globe. See here.

All Content and Software Copyright © Rixstep. All Rights Reserved.

CONTACT INFO:
John Cattelin
Media Contact
contact@rixstep.com
PURCHASE INFO:
ACP/Xfile licences
User/Family/Business
http://rixstep.com/buy
About | ACP | Buy | Industry Watch | Learning Curve | News | Products | Search | Substack
Copyright © Rixstep. All rights reserved.