Gentoo Archives: gentoo-amd64

From: "Bo Ørsted Andresen" <bo.andresen@××××.dk>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Re: urgent: Segfaults after synchronously emerging|downloading 30GB|burnng a DVD iso image
Date: Tue, 30 May 2006 18:05:49
Message-Id: 200605302001.41591.bo.andresen@zlin.dk
In Reply to: Re: [gentoo-amd64] Re: urgent: Segfaults after synchronously emerging|downloading 30GB|burnng a DVD iso image by Hamish Marson
1 Tuesday 30 May 2006 19:23 skrev Hamish Marson:
2 > Just be careful with this one. If the destination directory doesn't
3 > exist, then you'll overwrite the sourcefiles with the first block...
4 > Ooops... (Having said that, it's still my favourite way of copying
5 > lots of files from one place to another).
6
7 That's why it should be like this:
8
9 # cd /sourcedir && tar -cpf - . | (cd /destdir && tar -xvpf -)
10
11 Then it will fail and abort if any of the cd operations fails. Also the
12 destdir should be given either as an absolute path or relative to the
13 sourcedir (not relative to whatever your path is when you issue the command
14 above.
15
16 With GNU tar one can simply do this:
17
18 # tar -C /sourcedir -cpf - . | tar -C /destdir -xvpf -
19
20 --
21 Bo Andresen