Posted on 10-29-2015 02:04 PM
Looking for a script to force quit all user apps. We are seeing some issues with some apps being open when they get an update causing issues.
Posted on 10-29-2015 02:25 PM
I use this code. It's killing only things in /Applications so modify as necessary.
#!/bin/shForce quit all non-essential applications
declare -a killPIDs killPIDs=$(ps axww -o pid,command | grep -v bash | grep [A]pplications/ | grep -v /bin/sh | grep -v [C]asper | grep -v [J]amf | grep -v [S]elf Service | grep -v [M]cAfee | grep -v [V]ZAccess* | grep -v grep | awk '{print $1}')Kill said processes.
for i in ${killPIDs[@]} do echo "Killing PID $i" kill -9 $i done exit 0
Posted on 08-04-2021 06:05 AM
This script doesnt seem to work. Please can you have a look @thoule