[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Sheflug] cpio people?
'ello ...
Is there anyone that uses cpio and knows enough about it to answer a quirk?
Google so far hasn't helped :)
In essence, why does this work:
find . -name 'rrn.*' | cpio -vH newc -o > bob
and this doesn't:
ls -1 ./rrn.* | cpio -vH newc -o > bob
Something strange is going on; there are files named rrn.* in the directory
as this shows ...
[4397%][bubbles][tmp] >ls -1 ./rrn.*
./rrn.10752.3
./rrn.10752.4
./rrn.10752.5
./rrn.10752.6
./rrn.10752.7
./rrn.10752.8
./rrn.10752.9
./rrn.29355.2
./rrn.29355.3
./rrn.29355.4
./rrn.29355.5
./rrn.29355.6
./rrn.29355.7
./rrn.29355.8
./rrn.29355.9
[4398%][bubbles][tmp] >
however, when I pipe the results to cpio, it complains ...
[4398%][bubbles][tmp] >ls -1 ./rrn.* | cpio -vH newc -o > bob
cpio: ./rrn.10752.3: No such file or directory
cpio: ./rrn.10752.4: No such file or directory
cpio: ./rrn.10752.5: No such file or directory
cpio: ./rrn.10752.6: No such file or directory
cpio: ./rrn.10752.7: No such file or directory
cpio: ./rrn.10752.8: No such file or directory
cpio: ./rrn.10752.9: No such file or directory
cpio: ./rrn.29355.2: No such file or directory
cpio: ./rrn.29355.3: No such file or directory
cpio: ./rrn.29355.4: No such file or directory
cpio: ./rrn.29355.5: No such file or directory
cpio: ./rrn.29355.6: No such file or directory
cpio: ./rrn.29355.7: No such file or directory
cpio: ./rrn.29355.8: No such file or directory
cpio: ./rrn.29355.9: No such file or directory
cpio: : No such file or directory
1 block
[4399%][bubbles][tmp] >
Unlike find which does this instead...[first the results of find by
itself]...
[4399%][bubbles][tmp] >find . -name 'rrn.*'
./rrn.10752.9
./rrn.10752.8
./rrn.10752.7
./rrn.10752.6
./rrn.10752.5
./rrn.10752.4
./rrn.10752.3
./rrn.29355.9
./rrn.29355.8
./rrn.29355.7
./rrn.29355.6
./rrn.29355.5
./rrn.29355.4
./rrn.29355.3
./rrn.29355.2
[4400%][bubbles][tmp] >
...and passing this to cpio...
[4400%][bubbles][tmp] >find . -name 'rrn.*' | cpio -vH newc -o > bob
./rrn.10752.9
./rrn.10752.8
./rrn.10752.7
./rrn.10752.6
./rrn.10752.5
./rrn.10752.4
./rrn.10752.3
./rrn.29355.9
./rrn.29355.8
./rrn.29355.7
./rrn.29355.6
./rrn.29355.5
./rrn.29355.4
./rrn.29355.3
./rrn.29355.2
57 blocks
[4401%][bubbles][tmp] >
... and lo and behold, I have a cpio archive. Now ... what the blazes is
going on? In both cases, both find and ls are returning a single filename
per line (which is what cpio is expecting)... but one is okay, whilst the
other causes problems.
Hmm...
Chris...
--
\ Chris Johnson \ NP: Chris Isaak - Wicked Games
\ cej [at] nightwolf.org.uk ~-----,
\ http://cej.nightwolf.org.uk/ ~-----------------------------------,
\ Redclaw chat - http://redclaw.org.uk - telnet redclaw.org.uk 2000 \____
___________________________________________________________________
Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html
GNU the choice of a complete generation.