Which criteria to use to determine if the boot drive is AFPS or HFS+

c_kay
New Contributor III

Have anyone figured out which criteria to use to determine if the boot drive is AFPS or HFS+

2 REPLIES 2

gda
Contributor

jamf binary currently does not collect this information.
Use an Extension Attribute instead:

To get the filesystem name like "Journaled HFS+" or "APFS" use this:

#!/bin/sh
/usr/sbin/diskutil info -plist / | /usr/bin/xpath '//key[.="FilesystemName"]/following-sibling::*[1]/text()' 2>/dev/null

To get the filesystem type like "hfs" or "apfs" use this:

#!/bin/sh
/usr/sbin/diskutil info -plist / | /usr/bin/xpath '//key[.="FilesystemType"]/following-sibling::*[1]/text()' 2>/dev/null

emily
Valued Contributor III
Valued Contributor III

Unearth has an artifact to detect this. You can easily dump it into an EA to collect the data on recon.