I have thousands of pictures (raw) in my computer sorted out into many folders and subfolders. I want to copy those into cloud drive. I successfully mounted to cloud drive. Due to my limited upload bandwidth it may take couple of days to complete the upload. When I am trying to copy files using nautilus, some times the copy process just pauses due to network disconnect for a second of more so nautilus not able to copy a file. I need to take action (skip file and make note of that file) so the copy process will resume. I copied around 1000 files last night and the copy process was interrupted couple of times. After copy process is completed, I manually copied those skipped files, some times those skipped files are partially copied to destination, so I had to overwrite that file. I cant sit at computer for hours to check if the copy process is paused for some reason. I would like to automate this copy process using shell script.
Can you guys recommend the commands for this process so I can build a shell script? I need help in
- Should copy all files and folders, sub-folders
- It would be nice if copy process show some kind of progress so I know how much is completed.
- If the file exists at destination, it should overwrite it automatically.
- If the copy process is interrupted, it should try again for couple of times.
- If still fails, it should log the file details so I can examine later.
man cp
, readinfo coreutils 'cp invocation'
. You can answer all your questions by doing that. – waltinator Feb 15 '16 at 15:05rsync
notcp
... :P ;-) – Fabby Feb 15 '16 at 23:35