← 返回命令列表

Linux command

ntfsresize 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Show current size and minimum shrinkable size

sudo ntfsresize --info /dev/[sda1]

Perform a dry run

sudo ntfsresize --no-action --size [50G] /dev/[sda1]

Resize to a specific size

sudo ntfsresize --size [50G] /dev/[sda1]

Expand filesystem

sudo ntfsresize --expand /dev/[sda1]

Check if a device is ready

sudo ntfsresize --check /dev/[sda1]

Force resize

sudo ntfsresize --force --size [50G] /dev/[sda1]

说明

ntfsresize safely resizes NTFS filesystems without data loss or prior defragmentation. It can shrink or expand volumes on unmounted devices. For shrinking: First resize the filesystem with ntfsresize, then shrink the partition with fdisk or parted. For enlarging: First expand the partition, then use ntfsresize to grow the filesystem (or use --expand).

参数

-i, --info
Show volume size and the smallest shrunken size supported.
-m, --info-mb-only
Like --info but only print the shrinkable size in MB.
-s, --size _SIZE_k|M|G
Resize filesystem to SIZE. Modifiers: k (10^3), M (10^6), G (10^9).
-x, --expand
Expand the filesystem to the current partition size.
-c, --check
Check the device is ready to be resized without making changes.
-n, --no-action
Perform a test run without making changes (read-only).
-f, --force
Force operation even if the filesystem is marked for consistency check. Use twice (-ff) to skip all safety checks.
-b, --bad-sectors
Support disks with bad sectors that would otherwise be refused.
-P, --no-progress-bar
Disable the progress bar.
-v, --verbose
Increase output verbosity.
-V, --version
Display version number and exit.
-h, --help
Display help message and exit.

FAQ

What is the ntfsresize command used for?

ntfsresize safely resizes NTFS filesystems without data loss or prior defragmentation. It can shrink or expand volumes on unmounted devices. For shrinking: First resize the filesystem with ntfsresize, then shrink the partition with fdisk or parted. For enlarging: First expand the partition, then use ntfsresize to grow the filesystem (or use --expand).

How do I run a basic ntfsresize example?

Run `sudo ntfsresize --info /dev/[sda1]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -i, --info do in ntfsresize?

Show volume size and the smallest shrunken size supported.