Forrest logo
back to the resize2fs tool

resize2fs:tldr:fef9d

resize2fs: Shrink the filesystem to its minimum possible size.
$ resize2fs -M ${-dev-sdXN}
try on your machine

The command "resize2fs -M ${-dev-sdXN}" is used to resize the file system to the minimum size possible on a specific partition or device.

Here's a breakdown of each part of the command:

  • resize2fs: This is the command used to resize the ext2, ext3, or ext4 file systems.
  • -M: This option tells the command to resize the file system to the minimum possible size.
  • ${-dev-sdXN}: This is a placeholder for the actual device and partition name. You need to replace ${-dev-sdXN} with the appropriate device and partition identifier, such as /dev/sdXN. For example, if you want to resize the file system on the device /dev/sda1, the command would be "resize2fs -M /dev/sda1".

In summary, the command is used to shrink the file system of a specific device or partition to its minimum size.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the resize2fs tool