copy files using scp without overwriting


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting copy files using scp without overwriting
# 1  
Old 12-11-2010
copy files using scp without overwriting

Hi,

i need to use "scp" to copy a file without overwriting the same in destinations.

any suggestion?

thanks
Sivaji
# 2  
Old 12-11-2010

Check whether the file exists on the destination before using scp.
# 3  
Old 12-11-2010
hey thanks

is there any other option to "scp - "something" to avoid the file overwriting

Thanks
sivaraj B
# 4  
Old 12-11-2010
Did you look in the man page?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

scp error while trying to copy files

Hi, I am trying to copy files from one server to other using the below code. scp -B -p user@remoteserver:/tmp/abc.txt /landing/files The above command is failing with error You're not allowed to run 'scp -p -f /tmp/abc.txt ' When I am using scp -B -p , why am I getting error msg as scp... (2 Replies)
Discussion started by: Nikhath
2 Replies

2. Filesystems, Disks and Memory

Slow copy (cp) performance when overwriting files

I have a lot of binary files I need to copy to a folder. The folder is already filled with files of the same name. Copying on top of the old files takes MUCH longer than if I were to delete the old files then copy the new files to the now-empty folder. This result is specific to one system -... (3 Replies)
Discussion started by: ces55
3 Replies

3. UNIX for Advanced & Expert Users

Secure Copy, scp

Is there a way we can avoid asking of password when we transfer file from one Unix server to another server using SCP command. Or Is is possible that the batch file in unix in which I am giving the SCP command takes the password and transfer the files automatically without me typing the... (1 Reply)
Discussion started by: Pash
1 Replies

4. UNIX for Dummies Questions & Answers

directory copy with scp

I need to copy all files and directories with scp, but seems I am missing something? /usr/bin/scp -p /custscripts/* rmprod2:/custscripts doesn't copy directories and files under them. Please advise. (1 Reply)
Discussion started by: Daniel Gate
1 Replies

5. Shell Programming and Scripting

Copy files from multiple directories into one directory without overwriting them

I have several directories and all those directories have .dat files in them. I want to copy all those .dat files to one directory say "collected_directory" The problem is I don't want to overwrite files. So, if two file names match, I don't want the old file to be overwritten with a new one. ... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

6. Shell Programming and Scripting

shell script to copy files frm a linux machine to a windows machine using SCP

I need a shell script to copy files frm a linux machine to a windows machine using SCP. The files keeps changing day-to-day. I have to copy the latest file to the windows machine frm the linux machine. for example :In Linux, On July 20, the file name will be 20.txt and it should be copied to... (3 Replies)
Discussion started by: nithin6034
3 Replies

7. Shell Programming and Scripting

Trying to copy Using scp facing problem

source file is located in (elk.some.com) /export/elk2/vp141p/Somedir/dist/current/Filename.ear destination machine(191.hydc.xxx.com) /export/home/vp141p/ARCHIVE scp -p vp141p@hstst191.hydc.sbc.com:/export/elk2/vp141p/PM_Build_SBS/Build_PVT_SBS/dist/current/Filename.ear . The above code is... (5 Replies)
Discussion started by: vishwakar
5 Replies

8. Shell Programming and Scripting

overwriting existing files with scp.

Ok. I am using one cluster to remotely write into another cluster. I can scp to copy files from cluste1 to cluster2, however, I need to copy a file that already exists in cluster 2 and replace it with the new file. I was thinking I could either remove the file in cluster 2 (which I don't know how... (2 Replies)
Discussion started by: libertyforall
2 Replies

9. Shell Programming and Scripting

Unzip files without overwriting

Hi, 1)I have two zip files a.zip and b.zip. a.zip contains the files a.txt,b.txt and c.txt b.zip contains the files a.txt,b.txt,d.txt,e.txt Though some of the filenames in a.zip and b.zip are same, the size is different,i.e., the files are completely different even though their name is same.... (1 Reply)
Discussion started by: donisback
1 Replies

10. Shell Programming and Scripting

SCP copy

I want to copy all the files and subdirectory from a server. I tried scp pritish@ipaddress:/home/pritish -r $PWD it copies all the files but not the directory, Can any one help me. I want to copy files as well as subdirectory from a server directory Note: Use CODE-tags when... (2 Replies)
Discussion started by: pritish.sas
2 Replies
Login or Register to Ask a Question