小智 6
检查扇区大小:
sudo fdisk -l '/home/user/images/test.img'
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00070424
Device Boot Start End Sectors Size Id Type
/home/user/images/test.img1 * 2048 26623 24576 12M e W95 FAT16
/home/user/images/test.img2 26624 7200767 7174144 3,4G 83 Linux
Run Code Online (Sandbox Code Playgroud)
使用结束编号 (7200767) 作为参考添加 1 和 * 512,如下所示:
sudo truncate --size=$[(7200767+1)*512] '/home/user/images/test.img'
Run Code Online (Sandbox Code Playgroud)
你的文件应该被截断
| 归档时间: |
|
| 查看次数: |
7322 次 |
| 最近记录: |