The optional argument is the name of the package file to be converted. If there is no file-name specified on the command line, rpm2cpio will simply read from standard input and convert that to a cpio archive.
We can even convert any rpm package into cpio archive using following command:
rpm2cpio amarok-1.4.10-26.1.i586.rpm > blah.cpioHere we've directed rpm2cpio to convert the logrotate package file into cpio archive - blah.cpio.
Extracting one or more files from a rpm package file:
rpm2cpio /root/amarok-1.4.10-26.1.i586.rpm |cpio -ivd ./usr/share/doc/packages/amarok/READMEabove command will extract README file into current working directory under ./usr/share/doc/packages/amarok/ folder
In this case, the cpio options -i, -v, and -d direct cpio to:
* Extract one or more files from an archive.
* Display the names of any files processed, along with the size of the archive file, in 512-byte blocks.
* Create any directories that precede the file name specified in the cpio command.
0 comments:
Post a Comment