Find the exact Build Number of a specific Mac OS X update from the command line How do I find the System Build Number or I guess it is called just the Build Number (example 18A391 or  18G87 or 18G5033 or etc. etc.) for a specific Mac OS X updates? Not upgrade, just the regular updates. Examples: Supplemental or Security or Combo or Safari, etc. etc.
I am aware of thousands of blogs and websites that published those type of informations, but let's do a practical example:
Step #1
I download this specific dmg file (Security Update 2020-006 (Mojave)) from: https://support.apple.com/kb/DL2062?viewlocale=en_US&amp;locale=en_US
Step #2
I mount the dmg file and I extract the pkg file.
Now, I do believe that the pkg file that I just extracted from the dmg file it is some sort of xar archive file, so my question is:
using the command line, how do I unzip the xar archive file and after I unzip the archive, what specific plist file I am looking for in order to find out the exact Build Number of this specific Security Update 2020-006 update?
Thank you
The relevant file for that specific dmg is SecUpd2020-006Mojave.pkg/PackageInfo.
After mounting the dmg, do this:
% cd /tmp
% xar -x -f /Volumes/Security\ Update\ 2020-006/SecUpd2020-006Mojave.pkg SecUpd2020-006Mojave.pkg/PackageInfo
% grep -o 'com.apple.pkg.update.*&quot; ' SecUpd2020-006Mojave.pkg/PackageInfo | sed 's/.*\.//'

For updates that have been automatically downloaded to /Library/Updates/, the relevant file is named *.dist. For instance, in 001-48382/001-48382.English.dist there is
&lt;key&gt;macOSProductBuildVersion&lt;/key&gt;
&lt;string&gt;17G14033&lt;/string&gt;

and also
com.apple.pkg.SecUpd2020-005HighSierra.RecoveryHDUpdate.17G14033