-   Linux - Newbie (
-   -   Copying files (

paddyjoy 07-04-2005 05:47 AM

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?


hfawzy 07-04-2005 06:06 AM

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.

paddyjoy 07-04-2005 06:18 AM

Thats interesting never noticed that! So what does it do by default if the file already exists?


hfawzy 07-04-2005 06:23 AM

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"

paddyjoy 07-04-2005 06:27 AM

Thanks for the info. I think I'll try and use dump to do a proper backup, might be better in the long run.


abhijeetdutta 10-24-2013 03:37 PM

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.

JJJCR 10-25-2013 03:13 AM

use rsync to do incremental backup:

rsync -av --log-file=/var/log/myrsync.log /media/source_dir /media/destionation_dir

Firerat 10-25-2013 03:27 AM


Originally Posted by alstonnat (Post 5051938)
How is it going with you Paddy?
I tried and it works for me.
Thank you buddy!:newbie:

Paddy is unlikely to answer

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

JJJCR 10-25-2013 03:39 AM

wow..hmm..good catch Firerat

Hope this will help someone along the way :)

paddyjoy 10-25-2013 07:47 AM

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.

Firerat 10-25-2013 12:12 PM

Now... I didn't expect that :)

All times are GMT -5. The time now is 02:28 AM.