This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run fs_usage | |
sudo fs_usage -e -www | grep -i $searchTerm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set USERNAME variable to user | |
USERNAME="" | |
USER_HOME=$(/usr/bin/dscl . read "/Users/${USERNAME}" | awk -F ':' '/NFSHomeDirectory/ {print $2}' | awk '{$1=$1};1') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Read test | |
dd if=tstfile bs=2048k of=/dev/null count=1024 2>&1 | grep sec | awk '{print "Read: " $1 / 1024 / 1024 / $5, "MB/sec" }' | |
# Write test | |
dd if=/dev/zero bs=2048k of=tstfile count=1024 2>&1 | grep sec | awk '{print "Write: " $1 / 1024 / 1024 / $5, "MB/sec" }' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Toggle Spotlight | |
sudo mdutil -a -i off # Off | |
sudo mdutil -a -i on # On | |
# To remove the menu bar icon, run this Terminal command: | |
sudo chmod 600 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search && killall SystemUIServer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# On Macs without a T2 chip, boot into Single User Mode using cmd-S. | |
# On Macs with or without a T2 chip, boot into Recovery Mode using cmd-R and open Utilities > Terminal. | |
# Doesn't work on macOS 11 and newer | |
mount -uw /System/Volumes/Data | |
touch /var/db/.RunLanguageChooserToo | |
mount -uw / | |
touch /Volumes/Macintosh\ HD/var/db/.RunLanguageChooserToo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download | |
https://www.macports.org/install.php | |
# Uncompress | |
tar xjvf MacPorts-2.7.2.tar.bz2 | |
# Install | |
cd MacPorts-2.7.2 | |
./configure --prefix=${HOME}/.macports --with-install-user=${USER} --with-install-group=staff | |
make && make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find failed commands | |
select count(*) from mobile_device_management_commands where apns_result_status='Error'; | |
# Find failed VPP commands | |
select count(*) from mobile_device_management_commands where command='InstallApplication' and apns_result_status='Error'; | |
# Show devices with failed commands | |
select device_id from mobile_device_management_commands where apns_result_status='Error'; | |
# Show devices with failed VPP commands |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check connected wifi | |
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | grep SSID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Show all | |
defaults domains | tr ',' '\n' | |
# Global prefs | |
$(defaults read -g AppleLocale) | |
# is the same as | |
$(defaults read .GlobalPreferences AppleLocale) | |
# is the same as |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Interrogate the auth.db for System Preference permissions | |
sudo sqlite3 /var/db/auth.db .dump | grep -i system.preferences | awk -F "'" '{print $2}' | grep system |
NewerOlder