从linux分区映像中删除可用空间[关闭]

问题描述 投票:-1回答:1

我制作了Linux分区映像(ext4)。问题在于分区很大(50GB),但是其上的数据却是3GB或4GB。

如何从该图像中删除可用空间,使其只有3-4GB?

感谢您的回答。

linux image partitioning partition
1个回答
-1
投票

我在这里找到答案。https://superuser.com/questions/610819/how-to-resize-img-file-created-with-dd

e2fsck -f -y xxx.img
resize2fs -M xxx.img

非常简单,可以使用。

© www.soinside.com 2019 - 2024. All rights reserved.