Greetings.
I am creating a cron job on an archlinux server. This cron job should run daily, moving audio files and large bitmap files from a local directory A, to a remote directory (a samba share) B.
My first idea was to
- mount the remote samba share locally, in mount point C,
- mv the files from A to C.
To make sure the data finds its way to B exactly as it was in A, I felt the need to investigate how mv works.
According to the man file and the Debian info files, mv will copy the file from A to C, and only delete the original from A when the transfer to C completes successfully.
However, this documentation does not specify whether "successfully" just means the file was transferred, or whether it also does integrity checking (like computing an md5sum checksum etc).
Does mv do this?
If not, I need to use a different utility. I imagine loads of people have this very same need, and that this problem has been solved before. What other utility is ideal for this purpose?
Or do I use a combination of cp and rm, and do the md5sum check myself?
Thanks for your help,
Willard.