LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1147|回复: 1

关于cpio的用法

[复制链接]
发表于 2006-7-21 12:02:43 | 显示全部楼层 |阅读模式
起因于想查看fedoracore4下mkinitrd作成的initrd的内容。
在网上看到的方法:
# zcat initrd.img |cpio -i -c
证明可行。
但我用
# gunzip -c initrd.img > unzipedinitrd.img
# cpio -i -c unzipedinitrd.img
就不行了。bash没有反应。
想请教一下这个的原因,越详细越好。一直以来都对管道的
用法模糊。非常感谢。
 楼主| 发表于 2006-7-21 13:12:40 | 显示全部楼层
ok,I think I got the answer.
the cpio command needs a "<" before the archive name.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表