Unexpected behaviour of cpio in Solaros 2.6?

Unexpected behaviour of cpio in Solaros 2.6?

Post by Roland Titz » Tue, 21 Sep 1999 04:00:00



Hi all,

today I have detected an unexpected behaviour of cpio in Solaris 2.6.
I tried to create a cpio archive on a nearly full filesystem using:

cat <file list> | cpio cpio -oc -O <name of archive>

During this command the was full and cpio ask:

End of medium on "output".
Change to part 2 and press RETURN key. [q]

The manual page of cpio option -O says:
     -O file        Direct the output of cpio to file.   If  file
                    is a character special device and the current
                    medium is full, replace the medium and type a
                    carriage  return  to  continue  to  the  next
                    medium.  Use only with the -o option.

Why does cpio ask this in case of an ufs filesystem?
Is this a bug or a feature?
GNU's cpio terminates in this case as expected.
I must redirect the output of the cpio command for diagnosis reasons,
so my program hangs in this case:-(
Should I use GNU's cpio instead of Solaris one or does anybody knows
another solution to this problem?
--

Regards
Roland Titze

 
 
 

Unexpected behaviour of cpio in Solaros 2.6?

Post by Kevin Mile » Tue, 21 Sep 1999 04:00:00


Roland,

this is indeed strange. My only assumption is that the file has
exceeded 2 gigabytes (the maximum size file you can have).

Regards

Kevin

--
Kevin Miles

 
 
 

Unexpected behaviour of cpio in Solaros 2.6?

Post by nleit.. » Wed, 22 Sep 1999 04:00:00




Quote:> Hi all,

> today I have detected an unexpected behaviour of cpio in Solaris 2.6.
> I tried to create a cpio archive on a nearly full filesystem using:

> cat <file list> | cpio cpio -oc -O <name of archive>

> During this command the was full and cpio ask:

> End of medium on "output".
> Change to part 2 and press RETURN key. [q]

> Regards
> Roland Titze

Try doing:

ls <file list> | cpio -ocv > <name of archive or device>

this will work better.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

 
 
 

Unexpected behaviour of cpio in Solaros 2.6?

Post by Roland Titz » Thu, 23 Sep 1999 04:00:00





> > Hi all,

> > today I have detected an unexpected behaviour of cpio in Solaris 2.6.
> > I tried to create a cpio archive on a nearly full filesystem using:

> > cat <file list> | cpio cpio -oc -O <name of archive>

> > During this command the was full and cpio ask:

> > End of medium on "output".
> > Change to part 2 and press RETURN key. [q]

> > Regards
> > Roland Titze

> Try doing:

> ls <file list> | cpio -ocv > <name of archive or device>

> this will work better.

No, it does not work! The result that I get the message:

End of medium on "output".
To continue, type device/file name when ready.

In my opinion it is the same behaviour. I want use cpio as follows:

#!/bin/ksh
if out=$(cd <my directory> && cat <my filelist> | cpio -ocO <my archive>)
then
  print "Sucessfull."
else
  print "Not successfull, reason: $out"
fi

I think this is only possible with GNU cpio:-(
--

Regards
Roland Titze