This is a topic I have not been able to find a definitive answer on, or at least one with a good explanation on why one solution is better than the other. Lets say I have two local drives, one with files to be copied, one empty. Feedback is not necessary but optimal performance is, with a few caveats.
- The file structure from one point down must be consistent. For example, the files may be stored in the directory
xis located at
/my_drive_a/to_copy/files/x/– however when I copy it to
/my_drive_b/, I would like it to be structured only from
/files/down. So the result may look somewhat like
- The files transferring will not be the same each time, thus a function like
rsyncmay not be advantageous over a function like
- The file count will be in the thousands, although all of them are small.
- The data must be copied, and retained on
My initial thought would be simply doing
cp -R /my_drive_a/to_copy/files/x/ /my_drive_b/files/x/. Again, with limited experience in copy functions within Linux, I am not sure if this is an optimal solution to copying such a large number of files.