bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: bug in cpio?


From: Stepan Kasal
Subject: Re: bug in cpio?
Date: Thu, 13 Jun 2002 07:44:14 +0000 (UTC)
User-agent: slrn/0.9.6.2 (Linux)

On Wed, 12 Jun 2002 14:07:59 -0500, Jeff Holt <address@hidden> wrote:
> I've tried this on Linux 2.4.4-4GB (Suse Linux) and cpio-2.4.2-344. It
> will only extract the file if I don't specify -no-absolute-filenames.

Hallo,
        the following option should help:

       -d, --make-directories
              Create leading directories where needed.

Details:
        cpio won't create the directory for the file.  Observe:
kasal$ echo /home/kasal/tmp/db.txt|cpio -H newc -F tst.cp -o
1 block
kasal$ cpio -i -F tst.cp --no-absolute-filenames
cpio: home/kasal/tmp/db.txt: No such file or directory
1 block

The message means that the directory home/kasal/tmp does not exist.
(I admit that the error message should be perhaps better.)

OTOH:
kasal$ (echo /home;echo /home/kasal;echo /home/kasal/tmp;\
        echo /home/kasal/tmp/db.txt)|cpio -H newc -F tst.cp -o
2 blocks
kasal$ cpio -i -F tst.cp --no-absolute-filenames
2 blocks
kasal$ ls -R home
home:
kasal

home/kasal:
tmp

home/kasal/tmp:
db.txt

HTH,
        Stepan





reply via email to

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