bug-cpio
[Top][All Lists]
Advanced

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

Re: [Bug-cpio] weird cpio


From: Ladislav Michnovič
Subject: Re: [Bug-cpio] weird cpio
Date: Tue, 11 Dec 2007 14:18:53 +0100

2007/12/6, anon ymous <address@hidden>:
> hello,
> Am I missing something or is there something wrong with cpio because when i
> uncompress a cpio archive and then copress it again using
> ls . | cpio -o > file

Is it not  possible that you left previous archive file in that directory?

What seems really buggy behavior to me is this:
~/tmp> echo asdf > f16_datalog.csv
~/tmp> ls .
f16_datalog.csv
~/tmp> ls . | cpio -o > bar
1 block
~/tmp> ls .
bar  f16_datalog.csv
~/tmp> ls . | cpio -o > foo
cpio: File foo grew, 512 new bytes not copied
3 blocks

I can understand that "ls ." returs also foo, so cpio includes it to
the archive which is the same file, but let's do another test:
~/tmp> rm *
~/tmp> echo asdf > f16_datalog.csv ; echo asdf > bar
~/tmp> ls .
bar  f16_datalog.csv
~/tmp> ls . | cpio -o > foo
1 block

No adding of "foo" to itself happen.
Adding output archive to the archive itself happens if one file is
greater than 1 block.

But this not happen always:
~/tmp> rm *
~/tmp> echo asdf > f16_datalog.csv
~/tmp> ls . | cpio -o > foo
1 block
~/tmp> ls . | cpio -o > bar
2 blocks

Same conditions as in the first testcase (only bar and foo are
differently alphabetically ordered by "ls" command I guess) and no
adding of bar to itself happen.

I have cpio version 2.9. Version 2.6 do the same.
Can anybody please explain me why is this happening?

 Regards Ladislav.




reply via email to

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