• Mac OS X,  Mac Security,  Mass Deployment,  Network Infrastructure,  precache

    One-liner To Grab Which macOS Caching Server You’re Using

    There’s a macOS tool called AssetCacheLocatorUtil located at /usr/bin/AssetCacheLocatorUtil. The output is in… stderr. Because stderr is so fun to work with (note that sed -i only works with stdin). So, to update the caching server(s) you are using and only print the IP address of those, you’d do the following: /usr/bin/AssetCacheLocatorUtil 2>&1 | grep guid | awk '{print$4}' | sed 's/^\(.*\):.*$/\1/' | uniq If you use Jamf Pro and would like to use this as an extension attribute, that’s posted here: https://github.com/krypted/cachecheck. I didn’t do any of the if/then there, as I’d usually just do that on the JSS.

  • Mac OS X,  Mac OS X Server

    Finding Things on Mac OS X

    Mac OS X has a number of commands that will help you find things.  There’s find, grep and way more.  But the easiest of them all to use is locate.  To run locate simply type the word locate from within terminal followed by the case sensitive string of what you are looking for.  For example, if you want to find all files with the word Krypted in the name use the following command: locate Krypted Keep in mind when using the locate command that it will also find files that have the name in the path, so if I have a folder called Krypted, every single file in that folder…