1
I have launched several:
cp -r folder1 /home/USBkey/. &
cp -r folder2 /home/USBkey/. &
cp -r folder3 /home/USBkey/. &
Each folder contains mp3 files. At the end of all copies, when I listen to one mp3 in folder1 I can hear for a short time (2 or 3secs) a part of a song from folder3 for instance. Like "cp" doesn't care to other parallel "cp" and write inside another memory space it should.
Some advise about this?
Thanks
1AFAIK running them in parallel is not faster than running them in sequence, especially to copy from/to a USB key. If you don't get an actual answer to your question and still have problems, try 1. copying your files from your graphical file explorer (if you have one) or 2. running the 3
cp
s in sequence with&&
. – Nathan.Eilisha Shiraini – 2017-06-27T12:55:08.723As @NathanShiraini says, you need to copy in sequence, though it is probably better not to use
&&
, which will stop subsequent copies if there is an error in an earlier copy. – AFH – 2017-06-27T13:11:31.973@NathanShiraini: it is not only an issue of how it is fast but also that cp in parallel seems to mix the audio files... very weird. How to perform subsequent copy without && and in one line? – FTG – 2017-06-27T13:36:13.270
@FTG I know, but I do not know what are the gurratees of
cp
regarding parallel execution, so I didn't mention it. As for sequential execution of multiple commands, you can use;
as the separator to run each command regardless of the result of the last one. E.G.:cp -r folder1 /home/USBkey/. ; cp -r folder2 /home/USBkey/. ; cp -r folder3 /home/USBkey/.
– Nathan.Eilisha Shiraini – 2017-06-27T13:43:24.950