tar fs copy
Bob Peirce
rbp at investor.UUCP
Fri Sep 6 22:04:53 AEST 1985
> In article <221 at drivax.UUCP> alan at drivax.UUCP (Alan Fargusson) writes:
> >You might try tar(1), however you will have to fix it. If you have source
> >that is. As in the example in the manual type:
> >
> > cd fromdir; tar cf - . | ( cd todir; tar xf - )
> >
> >The problem with this is that when tar tries to make a directory in todir
> >it execs mkdir(1), then waits for ALL of its children to complete. But in
> >the bourne shell the first tar is a child of the second tar, so it can hang
> >forever. All you have to do is fix tar(1) so it only waits for the process
> >that it forked.
Wait a minute! I have a Bourne shell script called cphier which contains the
following and runs fine.
if [ $# -ne 2 ]
then
echo usage: cphier frompath topath
fi
exec tar cf - $1 | (cd $2; tar xf - )
What am I doing wrong?
--
Bob Peirce, Pittsburgh, PA
uucp: ...!{allegra, bellcore, cadre, idis}
!pitt!darth!investor!rbp
412-471-5320
NOTE: Mail must be < 30K bytes/message
More information about the Comp.unix.wizards
mailing list