Mac OS X by default can only read from attached USB drives with the NTFS file system. Here are the steps to enable read/write access:
sudo mkdir -p /Volumes/NTFS
Initial setup (only first time on a new Mac)
- Install Homebrew (and probably additional XCode tools)
- In Terminal: brew install caskroom/cask/osxfuse
- In Terminal: brew install ntfs-3g
- In Terminal: sudo mkdir -p /Volumes/NTFS
Each time when an NTFS USB drive is connected to the computer
- List disk partitions: diskutil list
- Find identifier of the partition with Windows_NTFS type (typically disk2s1 or disk3s1)
- Unmount found drive: sudo umount /dev/disk2s1
- Mount the drive with read/write access: sudo ntfs-3g /dev/disk2s1 /Volumes/NTFS -olocal -oallow_other
- The mounted drive should appear on the desktop, the file system should be mounted at /Volumes/NTFS.
The same steps in a shell script
sudo mkdir -p /Volumes/NTFS
DISK=`diskutil list | grep Windows_NTFS | sed -E "s/.+Windows_NTFS .+ GB +//"`
echo Mounting NTFS disk $DISK
sudo umount /dev/$DISK
sudo ntfs-3g /dev/$DISK /Volumes/NTFS -olocal -oallow_other
Комментариев нет:
Отправить комментарий