Skip to main content

Hi there, is there a way to get an extension attribute in Jamf to report a target file's last modified date?

Use stat -x
eg: stat -x /Applications/Box.app | grep "Modify" | awk '{print $2,$3,$4,$5,$6}'


Use stat -x
eg: stat -x /Applications/Box.app | grep "Modify" | awk '{print $2,$3,$4,$5,$6}'


Appears to be working when ran from terminal or from script/policy in Jamf but as an extension attribute it doesn't collect any data.



Appears to be working when ran from terminal or from script/policy in Jamf but as an extension attribute it doesn't collect any data.



You need to wrap the output for all extension attributes with <result> & </result>

So your last command should be:  echo "<result>$datemodified</result>"


You need to wrap the output for all extension attributes with <result> & </result>

So your last command should be:  echo "<result>$datemodified</result>"


Thank, that seemed to be the icing on the cake



Reply