歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> 如何解壓cpio文件

如何解壓cpio文件

日期:2017/3/3 16:05:34   编辑:關於Linux

解壓cpio文件 cpio -idmv < filename.cpio

同樣可以解壓img文件:cpio -idmv < filename.imgcpio

備份命令備份:cpio -covB > [file|device]

將數據備份到文件或設備上還原:cpio -icduv < [file|device}

將數據還原到系統中常用參數:-o :將數據copy到文件或設備上

-i :將數據從文件或設備上還原到系統中

-t :查看cpio建立的文件或設備內容

-c :一種比較新的portable format方式存儲

-v :在屏幕上顯示備份過程中的文件名

-B :讓預設的blocks可以增加到5120bytes,默認是512bytes,這樣可以使備份速度加快

-d :自動建立目錄,這樣還原時才不會出現找不到路徑的問題

-u :更新,用較新的文件覆蓋舊的文件cpio常與find 配合使用

oracle用的是這種歸檔,只好記錄一下了。

#gunzip 文件名。cpio.gz

#cpio -idmv < 文件名。cpio

# cpio -idvm < aix_oracle817_32_Disk1.cpio

cpio: 0511-903 Out of phase!

cpio attempting to continue…

cpio: 0511-904 skipping 124796 bytes to get back in phase!

One or more files lost and the previous file is possibly corrupt!

cpio: 0511-027 The file name length does not match the expected value.

# man cpio

c Reads and writes header information in ASCII character form. If a cpio archive

was created using the c flag, it must be extracted with c flag.

加上參數c就OK了。

cpio -idvmc < aix_oracle817_32_Disk1.cpio

 

Copyright © Linux教程網 All Rights Reserved