- 论坛徽章:
- 0
|
原帖由 ailms 于 2007-9-11 23:50 发表
$ mkdir tempdir
$ cd tempdir/
$ rpm2cpio ../zebra-0.93b-4.9.i386.rpm |cpio -id
6750 blocks
$ ll
total 12
drwx------ 6 bob bob 4096 Sep 11 23:50 etc
drwx------ 5 bob bob 4096 Sep 11 23: ...
谢谢!
$ info cpio
....
Extracting an archive requires a bit more thought because cpio will
not create directories by default. Another characteristic, is it will
not overwrite existing files unless you tell it to.
% cpio -iv < directory.cpio
This will retrieve the files archived in the file directory.cpio and
place them in the present directory. The `-i' option extracts the
archive and the `-v' shows the file names as they are extracted. If
you are dealing with an archived directory tree, you need to use the
`-d' option to create directories as necessary, something like:
% cpio -idv < tree.cpio
This will take the contents of the archive tree.cpio and extract it
to the current directory. If you try to extract the files on top of
files of the same name that already exist (and have the same or later
modification time) cpio will not extract the file unless told to do so
by the -u option.
...
那天看得文档不仔细,没有发现,谢谢 |
|