Unix Resources

MacProcess lookup or Westwind’s reference page.

Man Pagez or Man Pages

The X-Lab

Elevated Shell Shell as actual root user sudo su. Alternatively, sudo -s gives you elevated permissions but your home is still your home

flush DNS Cache

Turn off Mail preview of attachments – defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes (or false)

Copy only email address in Mail – defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false (or no)

List files in a directory and output the list  to a text file on the hard drive: ls > ~/list-of-files.txt

Disk Usage (this takes a while to run) sudo du -sh /* or df -hT hfs (display free disk space)

MemTest cd /usr/bin, memtest all, CTRL C. Instructions can be found on this page.

Enable Disk Utility’s debug menu  defaults write com.apple.DiskUtility DUDebugMenuEnabled 1  (change 1 to 0 to disable the debug menu)

chflags hidden /FilePath or chflags no hidden or SetFile -a V filename.txt or use a .

Clear font caches and databases: sudo atsutil databases -remove or get FontNuke

Diff lets you compare files or folders, diff file-1 file-2 or diff -rq folder-1 folder-2. Example, diff -rq [path to folder 1] [path to folder 2] > ~/Desktop/comparison.txt

This command will provide a nice list of files that occur in dirA but not in dirB, files that occur in dirB, but not in dirA, and files that differ between dirA and dirB. Pipe the output through grep to remove mention of uninteresting files, and sort to tidy it up, e.g.:
diff -qr dirA dirB | grep -v -e ‘DS_Store’ -e ‘Thumbs’ |
sort > diffs.txt

List of Defaults commands

MacAdmins’ favorites

touch ~/timestamp and then change some setting and then find -x / -newer ~/timestamp >~/changedfiles.txt” to generate a list of changed files, and store it in your home directory under the name “changedfiles.txt”. One of these changed files should be the settings file you need to locate.

Enter date 0201010116 and press Return

Make Install Media examples:  sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia –volume /Volumes/Untitled –applicationpath /Applications/Install\ OS\ X\ Yosemite.app —nointeraction

sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia –volume /Volumes/Untitled –applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app —nointeraction

System Integrity Protection (SIP), aka rootless csrutil enable and csrutil disable

Disable Time Machine local backups: sudo tmutil disablelocal

Tim’s service and support is absolutely superb. I couldn’t recommend anyone more highly.

Craig S. Scott
professor University of Washington

Read more testimonials.