![gzip 可以改变原始文件大小吗?](https://linux22.com/image/124756/gzip%20%E5%8F%AF%E4%BB%A5%E6%94%B9%E5%8F%98%E5%8E%9F%E5%A7%8B%E6%96%87%E4%BB%B6%E5%A4%A7%E5%B0%8F%E5%90%97%EF%BC%9F.png)
/dev/sdf
是 32G SD。据我所知,我已执行了以下步骤,但在尝试执行最后一步并写入 SD 时,我的文件图像似乎比 SD 大了一个字节。压缩图像是否会以某种方式增加原始图像的大小?
#inserted first SD in SD Reader and successfully wrote image to file
sudo dd bs=4M if=/dev/sdf of=pibackup.img
#inserted second SD in SD Reader and successfully wrote image to SD
sudo dd bs=4M if=pibackup.img of=/dev/sdf
gzip pibackup.img
//Might have been moved back and forth between servers using `scp`
gzip -d pibackup.img.gz
#inserted third SD in SD Reader but am unsuccessful writing image to SD
sudo dd bs=4M if=pibackup.img of=/dev/sdf
不成功,我的意思是: [Michael@devserver ~]$ sudo mount /dev/sdf7 /mnt mount: 错误的 fs 类型,错误的选项,/dev/sdf7 上的错误超级块,缺少代码页或帮助程序,或其他错误在某些情况下,可以在 syslog 中找到有用的信息 - 尝试 dmesg |尾巴左右
[Michael@devserver ~]$ dmesg |尾巴
DROP: IN=wlan0 OUT= MAC=ff:ff:ff:ff:ff:ff:78:24:af:ed:b7:58:08:00 SRC=192.168.1.1 DST=255.255.255.255 LEN=343 TOS=0x00 PREC=0x00 TTL=64 ID=63614 PROTO=UDP SPT=67 DPT=68 LEN=323
DROP: IN=wlan0 OUT= MAC=ff:ff:ff:ff:ff:ff:b4:b5:2f:12:aa:fa:08:00 SRC=0.0.0.0 DST=255.255.255.255 LEN=328 TOS=0x00 PREC=0x00 TTL=64 ID=70 PROTO=UDP SPT=68 DPT=67 LEN=308
DROP: IN=wlan0 OUT= MAC=b8:76:3f:69:31:95:78:24:af:ed:b7:58:08:00 SRC=192.168.1.1 DST=192.168.1.140 LEN=328 TOS=0x00 PREC=0x00 TTL=64 ID=12658 PROTO=UDP SPT=67 DPT=68 LEN=308
EXT4-fs (sdf5): mounted filesystem with ordered data mode. Opts:
SELinux: initialized (dev sdf5, type ext4), uses xattr
EXT4-fs (sdf7): bad geometry: block count 7453824 exceeds size of device (7256064 blocks)
SELinux: initialized (dev sdf6, type vfat), uses genfs_contexts
SELinux: initialized (dev sdf1, type vfat), uses genfs_contexts
EXT4-fs (sdf7): bad geometry: block count 7453824 exceeds size of device (7256064 blocks)
EXT4-fs (sdf7): bad geometry: block count 7453824 exceeds size of device (7256064 blocks)
[Michael@devserver ~]$