Artificial intelligent assistant

Copying only differences? I want to recursively copy one directory over another, however I only want to copy differences. The reason is that I'm doing this on Solaris on a volume which is snapshot, i.e. if I'm copying 100gig across to a directory that already contains 100gig but only 5gig is different I don't want the whole 100gig to be copied across as that will fill the disk with 200gig of data (100gig of new data and 100g of old data held by the snapshot). I want the final result to only take 105gig of space (i.e. 5 gig of new data and 100 gig of old data). Removing the snapshot isn't an option as we need a quick rollback option. It would great to only copy differences on a block basis, but even copying entire files only if they're different would be ok. The `-u` of `cp` won't work as the files at the destination may have newer timestamps. Also, I should note that the source and destination directories are on different volumes. How can I do this?

Rsync is your tool:


rsync --archive source/ dest/


Archive is just a compound option consisting of:


--recursive # recurse into directories
--links # copy symlinks as symlinks
--perms # preserve permissions
--times # preserve times
--group # preserve group
--owner # preserve owner
--devices # preserve device files
--specials # preserve special files


If you don't have rsync on your system you should get it. You could probably create some other solution using other tools, but if you are looking for that one program that does this one thing well (unless I misunderstand your question), what you are looking for is rsync.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 987db652dddd5bf17de7b5361dfd978e