Issue background
I think a lot of students using Mac will encounter the problem of read and write NTFS disk, because by default, Mac OSX mounts the NTFS disk is read-only (read-only), so it is very inconvenient to insert an NTFS-formatted disk into the Mac, which is only readable and not writable.
As a result, there are third-party tools such as Tuxera NTFS for Mac, Paragon NTFS for Mac, and so on, which can be used to write to NTFS under MAC, but these tools are charged and of course some cracked versions, But there is a security risk to cracking the software after all, so,i don ' t really like that.
In addition, Tuxera provides an open source NTFS read-write scheme: NTFS-3G, GPL-based ntfs-3g can also implement NTFS partition reads and writes on Mac OS X via the user-space file system. This plan is also quite good, just need simple installation, this article no longer unfolds. Specific can refer to the official link: http://www.tuxera.com/community/open-source-ntfs-3g/
But in fact, we can solve this problem completely without the help of any third-party tools, because in fact, OSX native is supported by NTFS. Later, due to Microsoft's limitations, Apple blocked this feature, but we can manually turn this option on from the command line.
How does that?
Mount View disk Mount status
123 |
thatsitdeMacBook-Pro:~ thatsit$ mount /dev/disk4s2 on /Volumes/Untitled (ntfs, local , nodev, nosuid, read -only, noowners) thatsitdeMacBook-Pro:~ thatsit$ |
At this point, if we are going to implement the writable mount of the/DEV/DISK4S1 partition, we just need to do a little bit of two steps: Unload, Reload
Unloading
1 |
thatsitdeMacBook-Pro:~ thatsit$ sudo umount /Volumes/Untitled/ |
Re-mount
1 |
thatsitdeMacBook-Pro:~ thatsit$ sudo mount -t ntfs -o rw,auto,nobrowse /dev/disk4s2 /Volumes/Udisk/ |
At this time/DEV/DISK4S2 has been read and written to the/volumes/udisk/, the following we will carry out the confirmation of the results of the Mount
Confirm Mount
123 |
thatsitdemacbook-pro:~ thatsit$ &NBSP; mount | grep ntfs /dev/disk4s2 on /volumes/udisk < Code class= "Bash Plain" (Ntfs,&NBSP; local thatsitdemacbook-pro:~ thatsit$ |
Test Write
123456789101112 |
thatsitdeMacBook-Pro:~ thatsit$
cd /Volumes/Udisk/ thatsitdeMacBook-Pro:Udisk thatsit$
touch test_writing thatsitdeMacBook-Pro:Udisk thatsit$ ll|
grep test_writing -rwxr-xr-x 1 thatsit staff 0 12 24 17:14 test_writing
thatsitdeMacBook-Pro:Udisk thatsit$
thatsitdeMacBook-Pro:Udisk thatsit$
echo heheda >> test_writing thatsitdeMacBook-Pro:Udisk thatsit$
cat test_writing heheda
thatsitdeMacBook-Pro:Udisk thatsit$
thatsitdeMacBook-Pro:Udisk thatsit$ ll|
grep test_writing -rwxr-xr-x 1 thatsit staff 7 12 24 17:15 test_writing
thatsitdeMacBook-Pro:Udisk thatsit$
|
Detailed description of the above mount parameters:
12345678910111213 |
<strong>
mount -t ntfs -o rw,auto,nobrowse /dev/disk4s2 /Volumes/Udisk/ < /strong > -t ntfs
# 执行要挂载的分区文件系统格式
-o
# 执行挂载的选项
rw
# read-write,以读写的方式挂载
auto
# 自动检测文件系统,此参数可以省略
nobrowse
# 这个选项非常重要,因为这选项指明了在finder里不显示这个分区,只有打开了这个选项才能将磁盘以读写的方式进行挂载
/dev/disk4s2 # 要挂载的分区,也就是我们在mount命令中看到的盘符 /Volumes/Udisk/ # 挂载点 *
/Volumes/Udisk
这个目录是需要存在的,如果不存在需要手动创建下:
sudo mkdir /Volumes/Udisk * 如果目录不存在会收到如下报错:
mount
: realpath
/Volumes/Udisk
: No such
file or directory |
As you can see from the above test, the NTFS partition is already writable, but there is another small problem at this time because we use the NOBROWSE option when we mount it, which is not displayed in the Finder.
There are always some students are not used to always use the command line to operate, so the need to solve the problem high:
The solution is actually very simple, because this partition is hung/volumes under, we put this directory on the desktop to make a soft link on the OK.
Create a soft link
123 |
thatsitdeMacBook-Pro:Udisk thatsit$ sudo ln -s /Volumes/Udisk/ ~ /Desktop/Udisk Password: # <----输入用户密码 thatsitdeMacBook-Pro:Udisk thatsit$ |
The effect is as follows: The following letter is displayed on the desktop, click to enter the Finder
----Done----
Reference Links:
Https://zh.wikipedia.org/wiki/NTFS
How to implement writable mount of NTFS partitions without using third-party tools under Mac