6. Miscellaneous
6.1. Property list utility
Read property list files:
$ plutil -p *.plist
6.2. xcode-select
Print the path of the active developer directory:
$ xcode-select -p
Open a dialog for installation of the command line developer tools:
$ xcode-select --install
6.3. hdiutil
Create a disk image:
$ hdiutil makehybrid -o "dir.udf" -udf "dir/"
Mount a ISO image:
$ hdiutil mount xxxx.iso
6.4. Manage Spotlight indexes
Print indexing status:
$ sudo mdutil -s "/Volumes/LAS_256G"
Turn off indexing:
$ sudo mdutil -i off -d "/Volumes/LAS_256G"
$ sudo mdutil -X "/Volumes/LAS_256G"
6.5. See cloud docs
$ cd ~/Library/Mobile\ Documents/com\~apple\~CloudDocs/
6.6. chflags
See flags of files:
$ ls -lO
Remove hidden (hide from GUI) flag:
$ chflags nohidden xxxx-file
Add hidden flag:
$ chflags hidden .msdb
6.7. dscl
Show all groups and their members:
sudo dscl . -list /groups GroupMembership
Add user _www to group staff:
sudo dscl . -append /Groups/staff GroupMembership _www
Delete user _www from group staff:
sudo dscl . -delete /Groups/staff GroupMembership _www