dev:tricks:macos
Table of Contents
Mac OS Tricks
Change the hostname
sudo scutil --set HostName testhostname.local hostname
Create a bootable OS X USB installation disk
sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Yosemite.app --nointeraction
F11 on a Mac for ESX Installs
* Fn+Ctrl+option+F11 * Or Go into the Mission Control settings and set 'Show Desktop' to be any other F- key besides F11. Go into the keyboard settings and check the box that says 'Use all F1, F2, etc. keys as standard function keys. * Or if you are using VMware Fusion, you can send key using Virtual Machine -> Send Key -> F11.
Install Homebrew
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" brew doctor brew update
Mount from directory to directory
brew install bindfs # brew install pkg-config if needed bindfs <src_directory> <dest_directory>
Install useful unix utility ssh-copy-id
curl -L https://raw.githubusercontent.com/beautifulcode/ssh-copy-id-for-OSX/master/install.sh | sh
Schedule tasks in Mac OS X
cat >> ~/me.hackerzhou.backup.plist <<EOF <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>me.hackerzhou.backup</string> <key>ProgramArguments</key> <array> <string>/Users/hackerzhou/bin/backup.sh</string> </array> <key>StartCalendarInterval</key> <dict> <key>Minute</key> <integer>0</integer> </dict> </dict> </plist> EOF sudo cp /Users/hackerzhou/me.hackerzhou.backup.plist /Library/LaunchDaemons/ sudo launchctl load /Library/LaunchDaemons/me.hackerzhou.backup.plist
Use Time Machine via NFS
http://smekkley.wordpress.com/2014/01/18/time-machine-via-nfs-on-mavericks/ http://images.apple.com/business/docs/Autofs.pdf http://tentacles666.wordpress.com/2013/10/27/nfs-mounts-in-os-x-mavericks/
dev/tricks/macos.txt · Last modified: 2020/06/06 23:32 by 127.0.0.1