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

发布了505 篇原创文章 · 获赞 1805 · 访问量 107万+

猜你喜欢

转载自blog.csdn.net/chengyq116/article/details/104709426