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
cp
s in sequence with&&
.&&
, which will stop subsequent copies if there is an error in an earlier copy.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/.