On Mon, 29 Mar 2004 21:44:26 +1200, you wrote:

>On Mon, 29 Mar 2004 21:00, Jim Cheetham wrote:
>> On Mar 29, 2004, at 8:50 PM, Christopher Sawtell wrote:
>> > Put both disks in the same machine and use cpio to move the data.
>> >
>> > man cpio
>> > cpio --help
>>
>> cpio is a dreadful holdover from sys V unix, iirc ... the syntax is
>> horrible, and there are absolutely no benefits over tar (not least
>> originally because each Unix vendor used a different internal cpio
>> format ...).
>
>The big advantage of cpio over tar is that the names of the files to be placed 
>in the archive are input to cpio's stdin. You can therefore use whatever file 
>selection algorithm is appropriate for the task at hand. In contrast, afaik, 
>tar can only copy directory trees.
tar can take a file of filenames, which can be generated in any way
you like ( -T )
>
>cpio also can cope with endianism and half-word re-ordering. cpio therefore 
>makes an ideal transport method to move data between machines of different 
>architectures.
Haven't come across problems like this since I used VMS in the '80s.
IIRC it didn't work properly then, and I had to write a specific
program to sort it out.
>
>The archive stream created by cpio comes out of its stdout. Thus it can be 
>used conveniently as the input to a pipe.
So can tar ( -f - )
>
>Whilst the traditional cpio implementations did indeed have a somewhat baroque 
>option and flag structure, the modern GNU implementation uses --long options 
>and is not only really quite understandable but also comprehensive.
tar also has built in compression algorithms ( -j and -z ) which,
although simple enough to add on the command line to cpio, the number
of pipes you are using to perform a single task become rather
daunting!
> 
>> If the disks are on the same machine (which is doubtful because one of
>> the machines is a laptop) then dd would be interesting (vide an earlier
>> discussion on the list), or tar would be normal.
>
>Unless I'm totally mistaken, there is no mention of one of the machines being 
>a lappie in the original posting.
...vide an earlier discussion on the _list_ ?

In the early 80s DEC had an editor called teco. It was so powerful,
and had such a 'baroque' options list, the challenge was to see if you
could crash the system by typing in your name. cpio is a bit like that
- not as bad, obviously, but I know what cpio -ivcBmudlk < infile.cpio
does ( and there are some OS specific flags in there as well ), but
it's not really user friendly, is it (:

And don't forget, you don't need the leading '-' with tar options
either. Consistency, who needs it!


Steve

Reply via email to