This prints the names of all processes:
ps -axco comm | sed 1d
-a
: all users (like root when run as user and user when run as root)-x
: include processes without a controlling terminal-o comm
: output only the command column-c
: use command names instead of paths in the command columnsed 1d
: delete the first line (COMM
)
If you only want to quit Minecraft, you could run a shell script like this (or just killall minecraft
with launchd or cron):
while sleep 5; do killall minecraft 2> /dev/null; done