help with scp


Login or Register for Dates, Times and to Reply

 
Thread Tools Search this Thread
# 1  
help with scp

hi all
in my script i was using the "scp" command to copy 2 files from a certain directory on server A to the same directory on another server B, but for some reason its only copying the first file in the directory. This is the frst time that i used the scp command,any ideas appreciated.

thnks
# 2  
Try doing the copy in two steps, remote to local, local to remote. scp isn't too clever copying remote to remote directly.
# 3  
help with scp

Quote:
Originally Posted by porter
Try doing the copy in two steps, remote to local, local to remote. scp isn't too clever copying remote to remote directly.
Thanks Porter,but i didnt put the question in a right way,in the scenario i mentioned above,i'm on the serever A,pls gimme an idea
# 4  
How about you show us what you are currently doing...
# 5  
Are you sure you used the correct syntax, maybe a typo?

I got no problem using scp for multiple files, for example if you're in server A, in the directory where you're going to copy the files from you can use:

Code:
scp file1 file2 file3 username@serverB:/home/username


Last edited by rubionis; 04-15-2008 at 07:36 PM.. Reason: added code tags
# 6  
These are fairly clear instructions and examples.

I agree that scp's syntax can be a little odd at times if you're new to it.

scp
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #387
Difficulty: Medium
The Unix apropos utility locates commands using a neural network.
True or False?

8 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Need help with scp

Hi, I am trying to do scp from server A to server B. But while doing the scp i am getting the following message. +-----------------------------------------------------------------+ | This system is for the use of authorized users only. | | Individuals using this computer system... (6 Replies)
Discussion started by: sidh_arth85
6 Replies

2. AIX

scp

1. how to move files in a directory using scp ? 2. how to move the entire directory ? 3. Will the file and the directory permissions affect scp usage? (1 Reply)
Discussion started by: samsungsamsung
1 Replies

3. Red Hat

scp with su

Hi Friends, I am trying to copy some files over the network in between my linux servers. I am using scp command for this. by default direct ssh root login is disabled on all of my linux servers. Normaly we used to login as a normal user and the su to th root user. unfortunately root user is... (1 Reply)
Discussion started by: arumon
1 Replies

4. Shell Programming and Scripting

Is this possible with SCP?

I normally download a directory recursively using: scp -r <name>@host:<path> . This has worked fine. As everyone knows this will download all of the directory named in <path> and all of the sub directories. I would like to know if it is possible to not download a particular file if it... (5 Replies)
Discussion started by: cpabrego
5 Replies

5. Shell Programming and Scripting

scp

hi can any one pls tell me how to copy a file from a remote host to the same remote host with a timestamp, i need to use only scp. thnks (4 Replies)
Discussion started by: bkan77
4 Replies

6. Shell Programming and Scripting

What is scp-ed over?

Hi all, i have a directory in server A. the directory path is /home/kevin. I need to scp the directory to another server B. i would like to ask, when i do a scp of the /home/kevin , i can expect all the files from A to go B. However, how about the hidden files? for example the ssh keys in the... (4 Replies)
Discussion started by: new2ss
4 Replies

7. UNIX for Advanced & Expert Users

Scp

I am trying to transfer a 10g files using scp, but I am getting timeout errors is there anywhere that I can modify a config file or something to increase the time. (4 Replies)
Discussion started by: rbizzell
4 Replies

8. UNIX for Dummies Questions & Answers

scp

How do i use scp to copy a file from my home directory on a server I am logged into, to the computer I am using? I thought it would be something like: scp filename mycomp.company.org Thanks. (2 Replies)
Discussion started by: ignus7
2 Replies

Featured Tech Videos