Skip to content

Instantly share code, notes, and snippets.

@umjammer
Created March 8, 2015 13:46
Show Gist options
  • Select an option

  • Save umjammer/e07550c4df18dbfeb387 to your computer and use it in GitHub Desktop.

Select an option

Save umjammer/e07550c4df18dbfeb387 to your computer and use it in GitHub Desktop.
List startup items, launch daemons, plugins on your Mac
#!/bin/bash
EA=0
if [ $# -ge 1 ]; then
if [ $1"" == "-x" ]; then
EA=1
elif [ $1"" == "-h" ]; then
echo $0 "[-x] [-h]"
echo " -x exclude com.apple.*"
echo " -h show this help"
exit 0
fi
fi
for i in \
/Library/StartupItems \
/System/Library/StartupItems \
/Library/LaunchDaemons \
/System/Library/LaunchDaemons \
/Library/LaunchAgents \
/System/Library/LaunchAgents \
/Users/$USER/Library/LaunchAgents \
/Library/PreferencePanes \
/Users/$USER/Library/PreferencePanes \
/Library/QuickLook \
/Users/$USER/Library/QuickLook \
;
do
echo -e '\033[37;44m'"\033[1m"$i"\033[0m";
if [ $EA -eq 1 ]; then
gls -1 --ignore="com.apple.*" $i
else
ls -1 $i;
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment