Copying files
Anyone have any idea of an easy way to do this.
A few months ago I copied about 20 GB's of files into a shared directory on another pc. I want to do the same again but I don't want to waste time copying existing files, just want to get the new/changed ones. I can do the copy easily with the cp command but I need some way of automatically saying no when it asks if I want to overwrite. Can't find any option in the man pages. Any ideas? Paddy |
The cp command doesn't ask you you to overwrite unless you passed the -i option (interactive). So I guess that you have an alias that includes this option automatically.
So you can either remove this alias, or you can just type /bin/cp instead of cp. |
Thats interesting never noticed that! So what does it do by default if the file already exists?
Paddy |
It overwrites the file by default.
By the way, you can view all your 'aliases' by typing alias in a command prompt. You should notice this line : alias cp = 'cp -i'. Edit : Just forgot to say, if you want to remove an alias, type in a command prompt : "unalias cp" |
Thanks for the info. I think I'll try and use dump to do a proper backup, might be better in the long run.
Paddy |
easy and steady
rsync is a program that behaves in much the same way that rcp does, but has many more options and uses the rsync remote-update protocol to greatly speed up file transfers when the destination file already exists.
The rsync remote-update protocol allows rsync to transfer just the differences between two sets of files across the network link, using an efficient checksum-search algorithm described in the technical report that accompanies this package. |
use rsync to do incremental backup:
rsync -av --log-file=/var/log/myrsync.log /media/source_dir /media/destionation_dir |
Quote:
Last Activity: 2007-01-14 21:46 This thread was started:- 2005-07-04 and until yesterday the last post was 2005-07-04 But yes, rsync is the perfect utility for such things |
wow..hmm..good catch Firerat
Hope this will help someone along the way :) |
He he blast from the past ;-)
rsync is the way to go, or if you want something more interactive unison-gtk is good, it's based on rsync. |
Now... I didn't expect that :)
|
All times are GMT -5. The time now is 01:40 PM. |