Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-04-2005, 04:47 AM
|
#1
|
Member
Registered: Apr 2005
Location: Sydney
Distribution: FC5
Posts: 174
Rep:
|
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
|
|
|
07-04-2005, 05:06 AM
|
#2
|
Member
Registered: Aug 2002
Location: Egypt
Distribution: Debian Sarge, Slackware 10.0
Posts: 163
Rep:
|
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.
|
|
|
07-04-2005, 05:18 AM
|
#3
|
Member
Registered: Apr 2005
Location: Sydney
Distribution: FC5
Posts: 174
Original Poster
Rep:
|
Thats interesting never noticed that! So what does it do by default if the file already exists?
Paddy
|
|
|
07-04-2005, 05:23 AM
|
#4
|
Member
Registered: Aug 2002
Location: Egypt
Distribution: Debian Sarge, Slackware 10.0
Posts: 163
Rep:
|
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"
Last edited by hfawzy; 07-04-2005 at 05:27 AM.
|
|
|
07-04-2005, 05:27 AM
|
#5
|
Member
Registered: Apr 2005
Location: Sydney
Distribution: FC5
Posts: 174
Original Poster
Rep:
|
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
|
|
|
10-24-2013, 02:37 PM
|
#6
|
Member
Registered: Aug 2009
Posts: 141
Rep:
|
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.
|
|
|
10-25-2013, 02:13 AM
|
#7
|
Senior Member
Registered: Apr 2010
Posts: 2,290
|
use rsync to do incremental backup:
rsync -av --log-file=/var/log/myrsync.log /media/source_dir /media/destionation_dir
|
|
|
10-25-2013, 02:27 AM
|
#8
|
Senior Member
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683
|
Quote:
Originally Posted by alstonnat
How is it going with you Paddy?
I tried and it works for me.
Thank you buddy! 
|
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
|
|
|
10-25-2013, 02:39 AM
|
#9
|
Senior Member
Registered: Apr 2010
Posts: 2,290
|
wow..hmm..good catch Firerat
Hope this will help someone along the way 
|
|
|
10-25-2013, 06:47 AM
|
#10
|
Member
Registered: Apr 2005
Location: Sydney
Distribution: FC5
Posts: 174
Original Poster
Rep:
|
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.
|
|
|
10-25-2013, 11:12 AM
|
#11
|
Senior Member
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683
|
Now... I didn't expect that 
|
|
|
All times are GMT -5. The time now is 11:09 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|