I periodically copy a folder from my Ubuntu 12.04 laptop to a removable USB flash drive, using the Ubuntu file system (i.e. Nautilus 3.4.2) to drag the folder from one window to the other.
It then copies the files and asks me questions about whether I really want to overwrite, first asking about the folders, and then about the files...
When it asks about the files, it shows the first file it is thinking of overwriting, but it is a file that has not changed since I first copied it to the flash drive. It shows the same size but the timestamp is one second different between the two, for some reason. I tell it to go ahead and overwrite all such files, because I do want it to get the latest versions of files which have actually changed.
I would prefer it to only copy the files that are actually different, but I don't see how to do this, and it seems silly/wrong that the time is off by a minute on files which have not changed.
Why does this happen, and is there anything I can do about it? Is it a problem with the flash drive? Do I need to switch to using some other software to do this?
Edit: The difference is one second, not one minute, and the date isn't being updated to the copy date when I make these copies - the first file is a PDF I have never changed, and the date is from back in 2012 when I downloaded it, just one second off.
1 Answer
If you don't fear the terminal you could write a small shell script which copies your files periodically. Use cron to run the script for example every 15 minutes.
#!/bin/sh
source=/path/to/your/source/folder
target=/media/your/usb/drive
sudo rsync --verbose --recursive --update --human --progress $source $targetThen create an cron entry with crontab -e
Check these links for detailed information:
5