bug-cpio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-cpio] About cpio(1) destination directory


From: Sergey Poznyakoff
Subject: Re: [Bug-cpio] About cpio(1) destination directory
Date: Tue, 20 Jul 2010 12:31:14 +0300

P J P <address@hidden> ha escrit:

> Is there any way of providing a destination directory to cpio(1)?

No, there is not.  Use cd command.

> Following command does nothing but exit without any error or warning
> message, irrespective of whether ./bash directory exists or not.
>   $ rpm2cpio bash-4.1.7-1.fc13.i686.rpm | cpio -imd --quiet 
> --no-absolute-filenames ./bash

This is wrong.  Your command means "extract from the standard input all
files that match the globbing pattern "./bash".  Please, read the
documentation for a detailed description on the cpio invocation options
and arguments.

What you need to do in this case is

 rpm2cpio bash-4.1.7-1.fc13.i686.rpm | \
   (cd bash; cpio -imd --quiet --no-absolute-filenames)
   
> With the -p switch,
>  
>   $ rpm2cpio bash-4.1.7-1.fc13.i686.rpm | cpio -imd --quiet 
> --no-absolute-filenames  -p ./bash
> cpio: Mode already defined

Yes, of course.  This invocation is wrong.  The -i option instructs cpio
to run in copy-in mode and the -p tells it to run in copy-pass mode.

> It's quite weird.

There's nothing weird.  You cannot require both copy-in and copy-pass
modes at the same time.  Please, read the docs.

Regards,
Sergey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]