View previous topic :: View next topic |
Author |
Message |
SarahS93 l33t
Joined: 21 Nov 2013 Posts: 693
|
Posted: Sat Oct 08, 2016 8:34 pm Post subject: copy files from one disk to two other disks,at the same time |
|
|
There are 3 HDDs, all with ext4.
On HDD1 i have many files, some of them i will copy to HDD2 and HDD3.
Is there a way to do that with one copy-command?
So that only 1 time read from HDD1 and write the data to HDD2 and HDD3 at the same time?
I try this in two terminal windows with two midnight commanders, it works for a moment.
But after a few minutes comes problems.... HDD2 is a litle bit slower than HDD3.
In a machine with 16GB of Memeory does it works so for a moment, but by copying files they are have a size of a few hundrets of GB it will not work. |
|
Back to top |
|
|
Cyker Veteran
Joined: 15 Jun 2006 Posts: 1746
|
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21635
|
Posted: Sat Oct 08, 2016 11:43 pm Post subject: |
|
|
In general, cd dir ; tar xf - is dangerous, since a failure to cd dir means tar will extract in the previous working directory. It is better to use cd dir && tar xf - or to use tar -C dir -x -f -, both of which will avoid running tar if the cd dir fails. |
|
Back to top |
|
|
Cyker Veteran
Joined: 15 Jun 2006 Posts: 1746
|
Posted: Sun Oct 09, 2016 1:44 pm Post subject: |
|
|
Oooh, good call! |
|
Back to top |
|
|
|