LinuxCommandLibrary

ntfsresize

resizes NTFS filesystems without data loss

TLDR

Show current size and minimum

$ ntfsresize --info /dev/[sda1]
copy
Resize to specific size
$ ntfsresize --size [50G] /dev/[sda1]
copy
Shrink to minimum
$ ntfsresize --size [$(ntfsresize -i /dev/sda1 | grep minimum)] /dev/[sda1]
copy
Dry run
$ ntfsresize --no-action --size [50G] /dev/[sda1]
copy
Force resize
$ ntfsresize --force --size [50G] /dev/[sda1]
copy

SYNOPSIS

ntfsresize [options] device

DESCRIPTION

ntfsresize resizes NTFS filesystems without data loss. It can shrink or expand volumes, showing the minimum possible size before shrinking.
After resizing, the partition table must be updated separately (using fdisk/parted).

PARAMETERS

-i, --info

Show volume information.
-s, --size size
New size (K, M, G suffixes).
-n, --no-action
Dry run.
-f, --force
Force operation.
-b, --bad-sectors
Handle bad sectors.
-P, --no-progress
Disable progress bar.

TYPICAL WORKFLOW

$ # 1. Check filesystem
ntfsfix /dev/sda1

# 2. Get info
ntfsresize --info /dev/sda1

# 3. Resize filesystem
ntfsresize --size 50G /dev/sda1

# 4. Resize partition (separate step)
parted /dev/sda resizepart 1 50G
copy

CAVEATS

Unmount before resizing. Back up important data. Partition resize is separate step. Run from Live USB recommended.

HISTORY

ntfsresize is part of ntfs-3g, developed by Szabolcs Szakacsits and others, providing safe NTFS resizing on Linux.

SEE ALSO

ntfs-3g(8), parted(8), fdisk(8), gparted(8)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community