Reporting for HD Space for updates.

New Contributor II

Good morning- we are utilizing a script (jamf_ea_LatestOSSupported) from to report back  to make sure the MacBook has the required hardware/disk space/etc and what the highest OS is able to be installed. The problem we are running into is the disk space utilization is not being reported accurately at time ; or if they clear up disk space it never reports back accurately. We even ran the exact script locally for the disk space after deleting/blowing out portions and still reported incorrectly. 


Any ideas or a better disk space command by chance?



Get free space on the boot disk
systemFreeSpace=$( /usr/sbin/diskutil info / | /usr/bin/awk -F '[()]' '/Free Space|Available Space/ {print $2}' | /usr/bin/cut -d " " -f1 )