Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-20-2003, 07:30 PM   #1
LQ Newbie
Registered: Dec 2002
Posts: 14

Rep: Reputation: 0
scp recurse but NOT overwrite?

Is there a way to use scp to recursively copy something, but not overwrite any existing files?

This would really be great if I could figure it out..

With cp, this works:

cp -r --reply=no file1 file2

Anyone know how this would be possible?

If I'm not clear in my question please tell me and I can explain better.

Old 04-20-2003, 08:08 PM   #2
Registered: Nov 2002
Distribution: A totally 133t distro :)
Posts: 358

Rep: Reputation: 31
As far as I know theres no way to get scp to behave this way.
rsync has an update feature, maybe you should ckeck it out, man rsync.
Also theres a program called unison thats good for syncing / backups.
Old 04-20-2003, 08:48 PM   #3
LQ Newbie
Registered: Dec 2002
Posts: 14

Original Poster
Rep: Reputation: 0
Hrm, unison seems pretty good. I just spent about an hour installing and reading the docs about it.

I think this will work.. thanks.

edit: Hrm, unison is very slow for some reason.. I wish I could like pause it while it's syncing two directories remotely, because I'm trying to sync a huge directory (17gb) and I've got a 15kb/s upstream. I think I'll look into rsync some more..

Last edited by Goog; 04-20-2003 at 09:12 PM.
Old 12-04-2012, 08:55 PM   #4
LQ Newbie
Registered: Dec 2011
Posts: 5

Rep: Reputation: Disabled
Is there a way to use scp to recursively copy something, but not overwrite any existing files?
Not scp, but rsync will do the job:

rsync -av /from/here/dir

Hope this helps,


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
scp does not work and gives the following error message: scp: FATAL: Executing ssh1 i akay Linux - Networking 16 09-28-2008 11:41 PM
sed overwrite schneidz Programming 8 09-21-2005 02:56 PM
Copy and Overwrite jrdioko Linux - Newbie 2 06-29-2004 11:46 AM
recurse through subdirs? Axion Linux - Software 4 02-16-2004 08:12 PM
Can't overwrite MBR Elmo Linux - General 2 03-13-2003 01:24 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:12 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration