directory copy with scp


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers directory copy with scp
# 1  
Old 01-27-2012
directory copy with scp

I need to copy all files and directories with scp, but seems I am missing something?

HTML Code:
/usr/bin/scp -p /custscripts/*  rmprod2:/custscripts
doesn't copy directories and files under them.

Please advise.
# 2  
Old 01-27-2012
use -r option to recursively copy directories..

for more details, refer man scp
This User Gave Thanks to thegeek For This Post:
 
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. Shell Programming and Scripting

How to use scp for case insensitive copy?

Hi, I have a requirement to copy files from one server to other using SCP. I am using * to copy files as I just need to pick up the files that are ending with .OK. But few ok files are in upper case and few are in lower case. If I am using below code, only files with upper case OK are being... (1 Reply)
Discussion started by: Nikhath
1 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. Shell Programming and Scripting

Help with Secure Copy (SCP) command

Hi, I am in the process of converting ftp transfres to SCP in my scripts. Have some doubts with SCP command 1) currently script puts a list of ftp commands in afile and paasses the file to ftp as input echo "user abc pwd" >inputfile echo "ls *" >> inputfile echo "quit" >> inputfile... (5 Replies)
Discussion started by: justchill
5 Replies

5. 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

6. Shell Programming and Scripting

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 (3 Replies)
Discussion started by: sivarajb
3 Replies

7. 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

8. Solaris

scp - copy between two remote machines?

1. scp person1@10.10.10.1:file1 person2@10.10.10.2:file1 2. scp file1 person1@10.10.10.1:file1 For #1, I keep getting this error: Password: Host key verification failed. lost connection I have entered the correct password too! #2 works fine. I suppose I cannot copy a file between two... (6 Replies)
Discussion started by: kungpow
6 Replies

9. Shell Programming and Scripting

how to use SCP (secure copy) in UNIX

i have to transfer a file from one server to another. say, my script is running on server 'A' and one file has to be transferred from server 'A' to server 'B' using SCP. i am using it as: sourceserverA> scp -P <port> userid@serverBhostname:/put/this/here <sourcefile path> but it is giving... (1 Reply)
Discussion started by: dharmesht
1 Replies

10. UNIX for Dummies Questions & Answers

looking for a secure copy program (scp)

Hi could someone tell me where to find a secure copy prog. for unix and windows thnx a lot helios (4 Replies)
Discussion started by: helios
4 Replies
Login or Register to Ask a Question