如何解壓或是打包mini-rootfs-arm64.cpio.gz?
這種類型的包,是通過cpio和gzip這兩步壓包獲得的,所以解壓也需要經(jīng)過這兩步。
一:解壓
yaolan@ubuntu3:~/fs/test$
yaolan@ubuntu3:~/fs/test$ ls
test.cpio.gz
yaolan@ubuntu3:~/fs/test$
yaolan@ubuntu3:~/fs/test$
yaolan@ubuntu3:~/fs/test$ gunzip test.cpio.gz
yaolan@ubuntu3:~/fs/test$
yaolan@ubuntu3:~/fs/test$ ls
test.cpio
yaolan@ubuntu3:~/fs/test$
yaolan@ubuntu3:~/fs/test$ cpio -idmv < test.cpio
.
root
var
.................
boot
116753 blocks
test@ubuntu3:~/fs/test$ ls
bin dev home lib mnt proc run share test.cpio usr
boot etc init linuxrc opt root sbin sys tmp var
test@ubuntu3:~/fs/test$
test@ubuntu3:~/fs/test$
二:壓包
例如:打包test目錄下
test@ubuntu3:~/fs/test$
test@ubuntu3:~/fs/test$ ls
bin dev home lib mnt proc run share tmp var
boot etc init linuxrc opt root sbin sys usr
test@ubuntu3:~/fs/test$
test@ubuntu3:~/fs/test$ find ./* | cpio -H newc -o > test.cpio (或者 find ./* | cpio -H tar -o > test.cpio)
116753 blocks
test@ubuntu3:~/fs/test$
test@ubuntu3:~/fs/test$
test@ubuntu3:~/fs/test$
test@ubuntu3:~/fs/test$ ls
bin dev home lib mnt proc run share test.cpio usr
boot etc init linuxrc opt root sbin sys tmp var
test@ubuntu3:~/fs/test$
test@ubuntu3:~/fs/test$
test@ubuntu3:~/fs/test$ gzip test.cpio
test@ubuntu3:~/fs/test$ ls
bin dev home lib mnt proc run share test.cpio.gz usr
boot etc init linuxrc opt root sbin sys tmp var
test@ubuntu3:~/fs/test$
聯(lián)系客服