I want to using crontab to synchronize two directory between my linux partion and windows partion like this:
24 9 * * * cp -r /home/fan/Data /media/T/Data
But it would create a directory named Data in the origin Data directory, instead of copy the missing file from the source directory. I can't find a proper option at the cp manual to perfectly solve this. How can i copy the missing file(they do exist at the destination directory) from the src to dir.
And by the way, seems it need the T disk have been mounted to run the copy command, how to automatically mount the disk when i need to run the command(the mount command should run as root).
And how can i get the error message if the command have an exception?