• Bushel,  iPhone,  JAMF

    Install Apple Configurator To Use With Bushel

    Occasionally, when discussing various deployments with Bushel customers, we’ll recommend you use a tool called Apple Configurator for certain tasks. Apple Configurator is a great tool to manage iOS devices. It’s also a pretty decent tool when you need to create profiles for use on Macs. Apple Configurator is easily installed using the Mac App Store. Read More About Using Apple Configurator With Bushel On The Bushel Blog

  • Articles and Books,  public speaking

    My Page for Mac and iOS Conferences

    Conferences for Apple Systems Administrators have been popping up all over the place. There are the ones that have been around forever, like MacIT and then there are new conferences that sprung up in the past year, such as ACES and MacDevOps. Some have reached maturity, such as MacTech and Penn State Mac Admins. Now, we have conferences in North America, Europe and Australia (so only 4 continents to go). So, I made a page listing them. And a Pinterest board. The page is available here. And that Pinterest board: Follow Charles’s board Mac IT Conferences on Pinterest. I also took the liberty of listing a couple of conferences that are platform…

  • Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment

    Hide Safari’s Bookmarks Bar

    Safari has a bookmarks bar. Some people want to hide it. A lot of people used to do stuff like this by modifying the default user template in OS X. Not something we’ll be doing much in the future. So to do so with a script: defaults write com.apple.Safari ShowFavoritesBar -bool false To turn it back on: defaults write com.apple.Safari ShowFavoritesBar -bool true

  • Mac OS X,  Ubuntu,  Unix

    Removing Those Thousands Of Empty Directories In Bash

    Earlier, we looked at creating thousands of empty directories. Today, we’re going to get rid of them. But we need to get rid of only empty directories. To do so, we’ll use the find command: find . -depth -type d -empty -exec rmdir {} \; Now, we can put both into a script: mkdir $(printf '%05d\n' {1..10000}) find . -depth -type d -empty -exec rmdir {} \;

  • Mac OS X,  Mac OS X Server,  Mac Security,  Ubuntu,  Unix

    Using Inputs in Bash Scripts

    You can easily accept user provided input in bash by using the read command in bash for Linux and OS X. Here, we’ll echo out a choice to a user in a script, read the output into a variable called yn and then echo out the response: echo "Please enter y or n: " read yn echo "You chose wrong: $yn" Here, we used echo to simply write out what was chosen in the input. But we could also take this a little further and leverage a case statement to then run an action based on the choice selected: read -p "Should the file extension change warning be disabled (y/n)?…

  • Mac OS X,  Mac OS X Server,  Mac Security,  Ubuntu,  Unix

    Grab Your WAN IP In Scripts

    Sometimes when I’m writing a script, I need something to phone home to something in the script. For example, this can tell another daemon where to ssh into when I invoke it remotely. So, let’s say I want to grab my WAN address in a script. I can use curl with a number of 3rd party sites (sites that often change. But, one that we can use here is ipecho.net. Here, we’ll look at their plain output page here: curl ipecho.net/plain This can then get output into a variable or file for processing in other parts of a script. For example, the output here is basically the same thing but…

  • Java,  Mac OS X

    Some Command Line java Debugging Options

    There’s an excellent tool that can be used to grab a heap dump from a Java process. It’s called jmap. To do so, run the jmap command, followed by a format and a file path as the format and file operators. Also, provide the PID, as follows: jmap -dump:format=b,file=~/memdump.hprof 80446 Once dumped, you can view the dump file in the Memory Analyzer Tool (MAP) and find objects that use use too much memory and/or have memory leaks, as part of your troubleshooting. You can also replace the pid with a name of an executable or a core. Run the map tool along with a -h option for a help summary.…

  • Mac OS X,  Mac OS X Server,  Mac Security

    Caffeinate Your Commands

    The caffeinate command is pretty cool. It keeps your computer from going to sleep. It can run in a couple of different ways. There’s a timer that prevents sleep for a little while. You can also run another command from within caffeinate that keeps the system awake until the other command is finished. Here, we’ll scp a file called source file to a host called servername and keep the system from going to sleep until the process is finished: caffeinate -s scp sourcefile me:servername/targetfile Here, we’ll just use the boring command to tell the computer not to go to sleep for an hour: caffeinate -t 3600 &