Posted on 09-04-2018 12:36 PM
Hello,
Is there a way to check whether a DMG has been saved as a APFS image rather than HFS+? We mostly export PKG files from Composer, but sometimes someone here creates a DMG. We ran into the issue today where a DMG wouldn't install on any of our El Cap MacBooks because it was saved in APFS format. I went in and remade it (as a PKG since it didn't need to be a DMG) but now am hoping to have some sort of script to scan through our distribution site to see if there are any other APFS DMG files out there.
Is this possible?
Tim
Solved! Go to Solution.
Posted on 09-04-2018 12:54 PM
hdiutil fsid /full/path/to/image.dmg | egrep "HFS|APFS"
You could also drop the egrep
and just get the full output and visually scan it. Usually one of the partitions will show something like HFS+ or APFS to indicate which format it's in. For example, you might see a section like this:
Analyzing partition 5: disk image Apple_HFS
HFS+
The fsid
flag shows a lot of information in the output, most of which won't make much sense, but it should help you figure out which ones might need to be rebuilt.
Posted on 09-04-2018 12:54 PM
hdiutil fsid /full/path/to/image.dmg | egrep "HFS|APFS"
You could also drop the egrep
and just get the full output and visually scan it. Usually one of the partitions will show something like HFS+ or APFS to indicate which format it's in. For example, you might see a section like this:
Analyzing partition 5: disk image Apple_HFS
HFS+
The fsid
flag shows a lot of information in the output, most of which won't make much sense, but it should help you figure out which ones might need to be rebuilt.
Posted on 09-05-2018 09:10 AM
Thanks @mm2270 , using that I was able to scan the recent DMGs in the folder to determine that this was the only one.