Lots of other good ones here: http://apple.stackexchange.com/questions/400/please-share-your-hidden-os-x-features-or-tips-and-tricks/
To get a list of all user-defined keyboard shortcuts: defaults find NSUserKeyEquivalents
In the results, @
= command, ~
= option, ^
= control, $
= shift.
Spotlight status: sudo mdutil -a -s or mdutil -s mountPoint
Rebuild all indexes: sudo mdutil -avE
Enable/disable indexing of a volume: mdutil -i on|off mountPoint
afp://;AUTH=No%20User%20Authent@mac-support/mac-support
defaults write com.[vendor].[AppName] ApplePersistenceIgnoreState YES
(e.g., defaults write com.Apple.Preview ApplePersistenceIgnoreState YES
).tell application "Finder" to make new internet location file at desktop to "smb://registry.otago.ac.nz/mdr/Profiles/staff3/s/7/stani07p" with properties {name:"Staff Desktop Profile"}
find . -exec setfile … {} \;
. See man page for SetFile
(case-sensitive!).sudo killall VDCAssistant
.sudo postfix start
will start the mail system, as it has a tendency to switch itself off. Typical symptom:% mailq postqueue: fatal: Queue report unavailable - mail system is downTo delete the contents of the queue:
sudo postsuper -d ALL
From https://stackoverflow.com/a/23359182.
diskutil erasevolume HFS+ 'RAMDiskName' `hdiutil attach -nomount ram://XXXXXX`
where XXXXXX is a count of 512-byte blocks (e.g., 262114 for a 128MB RAM disk). Disk will be mounted at /Volumes/RAMDiskName/
.
This is kind of the “nuke it from orbit approach” as it has to re-import all the messages from 365 and a bunch of settings will be reset, but it does fix the slow launch problem.
Hmm, watch out for the DataVaults
folder under Library/Containers/com.apple.mail/Data
in Catalina. It’s protected by SIP and only deletable via the Terminal in recovery (nice job, Apple). Need to mount the volume via Disk Utility first if it’s encrypted (always?).
macos-virtualbox
from https://github.com/myspaghetti/macos-virtualbox./opt/local/bin/bash -i macos-guest-virtualbox.sh
/Applications/VirtualBox/Contents/MacOS/VBoxManage setextradata "Catalina" VBoxInternal2/EfiGraphicsResolution 1920x1080where
"Catalina"
is the name of the VM.See https://apple.stackexchange.com/a/343989 for how to remote access a Mac without unlocking the local display. Short version: