Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/bin/pax
> > Will "tar -xf file.tar -C /destdir --chroot" chroot to /destdir ?
> > Or do we have to do "(cd /destdir ; tar -xf - --chroot) <file.tar"
> > to get that effect?
>
> A lot of static analisis later.....
>
> If -C destdir is specified, and there are no filename patterns (ie
> extracting all the archive), then the chdir() will be done before
> the chroot().
>
> If there are filename patterns (extract different files to different
> places) then the chdir() is done after the chroot() - ie when a file
> matching the pattern is found.
>
> So "tar -xf file.tar --chroot -C /destdir" will chroot to /destdir.
Nope... the chroot is always to the original current directory.
the cd /destdir will be done before the chroot - but may be affected
by the chroot ("." must be inside the chroot).
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index