cpio怎样释放文件到当前目录下?

sh/bash/dash/ksh/zsh等Shell脚本
回复
头像
imfinger
帖子: 45
注册时间: 2010-03-29 17:08

cpio怎样释放文件到当前目录下?

#1

帖子 imfinger » 2010-07-19 23:32

我通过

代码: 全选

lufeng@lufeng-desktop:~$ find /home/lufeng/test | cpio -oVB>user1.cpio

命令将/home/lufeng/test 进行归档备份处理了以后
再通过命令

代码: 全选

lufeng@lufeng-desktop:~$ mkdir testout
 lufeng@lufeng-desktop:~$ cd testout
lufeng@lufeng-desktop:~/testout$ cpio -i </home/lufeng/uer1.cpio
进行提取的时候。怎么没有提取到当前的testout目录? :em20 请教。
ubuntu新手
aerofox
帖子: 1453
注册时间: 2008-05-24 8:30

Re: cpio怎样释放文件到当前目录下?

#2

帖子 aerofox » 2010-07-20 6:52

如果你使用命令

代码: 全选

cpio -id --no-absolute-filenames < /home/lufeng/uer1.cpio
就可以在 testout 下建立 home/lufent/test 目录了。

如果你想 cpio -i 时建立 test 目录下,则应该在 cpio -o 时,到 /home/lufeng 目录下执行

代码: 全选

find test | cpio -oVB>user1.cpio
头像
imfinger
帖子: 45
注册时间: 2010-03-29 17:08

Re: cpio怎样释放文件到当前目录下?

#3

帖子 imfinger » 2010-07-20 13:15

aerofox 写了:如果你使用命令

代码: 全选

cpio -id --no-absolute-filenames < /home/lufeng/uer1.cpio
就可以在 testout 下建立 home/lufent/test 目录了。

如果你想 cpio -i 时建立 test 目录下,则应该在 cpio -o 时,到 /home/lufeng 目录下执行

代码: 全选

find test | cpio -oVB>user1.cpio
:em06 谢谢 aerofox
ubuntu新手
回复