mkfs.ntfs - mkntfs - create an NTFS file system - 創建 NTFS 文件系統

mkfs.ntfs - mkntfs - create an NTFS file system - 創建 NTFS 文件系統

Documentation
https://docs.oracle.com/en/

Oracle Solaris 11.2 Information Library (簡體中文)
https://docs.oracle.com/cd/E56344_01/

手冊頁部分 1M:系統管理命令
https://docs.oracle.com/cd/E56344_01/html/E54077/index.html

mkntfs is used to create an NTFS file system on a device (usually a disk partition) or file. device is the special file corresponding to the device (e.g /dev/hdXX). number-of-sectors is the number of sectors on the device. If omitted, mkntfs automagically figures the file system size.
mkntfs 實用程序用於在設備上 (通常是磁盤分區或文件) 創建 NTFS 文件系統。device 是對應於設備的特殊文件,例如 /dev/hdXXnumber-of-sectors 是設備上的塊的數目。如果省略,則 mkntfs 將自動計算文件系統大小。

Nearly all options have two equivalent names. The short name is preceded by - and the long name is preceded by --. Any single letter options, that don’t take an argument, can be combined into a single command, e.g. -fv is equivalent to -f -v. Long named options can be abbreviated to any unique prefix of their name.
大多數選項都有單字母和全名兩種形式。不接受參數的單字母選項可以多個組合到一起。例如,-fv 等效於 -f -v。全名選項可以縮寫爲其名稱的唯一前綴。

1. Basic options - 基本選項

-f, --fast, -Q, --quick
Perform quick (fast) format. This will skip both zeroing of the volume and bad sector checking.
執行快速格式化。此選項會跳過卷的零位調整和壞扇區檢查。

-L, --label STRING
Set the volume label for the filesystem.
將文件系統的卷標籤設置爲 string。

-C, --enable-compression
Enable compression on the volume.
在捲上啓用壓縮。

-n, --no-action
Causes mkntfs to not actually create a filesystem, but display what it would do if it were to create a filesystem. All steps of the format are carried out except the actual writing to the device.
使 mkntfs 不實際創建文件系統,但顯示它創建文件系統時將執行的工作。將執行所有格式化步驟,只是不實際寫入到磁盤。

2. Advanced options - 高級選項

-U, --with-uuid
Generate a random volume UUID.

3. Output options - 輸出選項

-q, --quiet
Quiet execution; only errors are written to stderr, no output to stdout occurs at all. Useful if mkntfs is run in a script.
錯誤將寫入到 stderr,不會向 stdout 寫入任何輸出。如果在腳本中運行 mkntfs,則此選項比較有用。

-v, --verbose
Verbose execution.
以詳細模式執行。

--debug
Really verbose execution; includes the verbose output from the -v option as well as additional output useful for debugging mkntfs.
包括來自 -v 選項的詳細輸出,以及對於調試 mkntfs 有用的其他輸出。

4. Help options - 幫助選項

-V, --version
Print the version number of mkntfs and exit.
顯示 mkntfs 版本號並退出。

-l, --license
Print the licensing information of mkntfs and exit.
顯示 mkntfs 許可信息並退出。

-h, --help
Show a list of options with a brief description of each one.
顯示選項的列表及每個選項的簡要說明。

volume ['vɒljuːm]:n. 體積,量,卷,容積

5. sudo mkntfs -f /dev/sdc2

strong@foreverstrong:~$ sudo mkntfs -f /dev/sdc2
[sudo] password for strong: 
The partition start sector was not specified for /dev/sdc2 and the automatically determined value is too large (5859375104). It has been set to 0.
Cluster size has been automatically set to 4096 bytes.
To boot from a device, Windows needs the 'partition start sector', the 'sectors per track' and the 'number of heads' to be set.
Windows will not be able to boot from this device.
Creating NTFS volume structures.
mkntfs completed successfully. Have a nice day.
strong@foreverstrong:~$ 
strong@foreverstrong:~$ sudo mkntfs -f /dev/sdc3
The partition start sector was not specified for /dev/sdc3 and the automatically determined value is too large (11718750208). It has been set to 0.
Cluster size has been automatically set to 4096 bytes.
To boot from a device, Windows needs the 'partition start sector', the 'sectors per track' and the 'number of heads' to be set.
Windows will not be able to boot from this device.
Creating NTFS volume structures.
mkntfs completed successfully. Have a nice day.
strong@foreverstrong:~$ 
strong@foreverstrong:~$ sudo mkntfs -f /dev/sdc4
The partition start sector was not specified for /dev/sdc4 and the automatically determined value is too large (17578125312). It has been set to 0.
Cluster size has been automatically set to 4096 bytes.
To boot from a device, Windows needs the 'partition start sector', the 'sectors per track' and the 'number of heads' to be set.
Windows will not be able to boot from this device.
Creating NTFS volume structures.
mkntfs completed successfully. Have a nice day.
strong@foreverstrong:~$

快速格式化 - -f 參數

sudo mkntfs -f /dev/sdc1
sudo mkntfs -f /dev/sdc2
sudo mkntfs -f /dev/sdc3
sudo mkntfs -f /dev/sdc4

References

http://manpages.ubuntu.com/manpages/xenial/en/man8/mkntfs.8.html
http://manpages.ubuntu.com/manpages/bionic/en/man8/mkntfs.8.html
https://docs.oracle.com/cd/E56344_01/html/E54077/mkntfs-1m.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章