Regarding SCP --urgent


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Regarding SCP --urgent
# 1  
Old 06-11-2008
MySQL Regarding SCP --urgent

Hi,

I have some problem with SCP. My requirement is to copy a file from my unix box to another unix box.so,I am using following command in my script,

/opt/SCssh/3.7.1_C0/bin/scp <FilePath>/<Filename> <SRVNAME>:<FILEPATH>

I have been using the same command since 3yrs.so it worked properly.but from past 2 weeks its giving errors while copying files.Then i tried the following version ,

scp <FilePath>/<Filename> <SRVNAME>:<FILEPATH>

Now its working.Only thing i did is , i have removed the absolute path of the SCP. Could anyone clarify me why it is failing suddenly with the absolute path. I am using SOLARIS8.0 OS.

Also plz give me the command for copying a file using sftp.

thanks in advance..

cheers
mohan
# 2  
Old 06-11-2008
The only reason I can think of is that someone has changed the place where scp usually resides, or has changed the PATH.
Do a "whereis scp" or "which scp" and you'll see.
# 3  
Old 06-11-2008
sysgate have reason.

Try to configure the $PATH inside the script. Because the command works: itīs sure that all process implicated are running.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

URGENT Reading a file and assessing the syntax shell script URGENT

I am trying to write a shell script which takes an input file as an arguement in the terminal e.g. bash shellscriptname.sh input.txt. I would like for the file to be read line by line each time checking if the .txt file contains certain words or letters(validating the syntax). If the line being... (1 Reply)
Discussion started by: Gurdza32
1 Replies

2. UNIX for Dummies Questions & Answers

How to use scp?

How to copy multiple directories using single command on solaris 10 from server A to server B. I tried scp but its working only one directory at atime How to acheive this with simple and short solution????? (6 Replies)
Discussion started by: buzzme
6 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. UNIX for Advanced & Expert Users

URGENT,URGENT- Need help tape drive installation

Hi, I am trying to attach tape drive to sun V890 running Solaris 9 on it. I have installed HBA(qlogic) in slot 1 of 0-8 slots and booted the system. I do not see HBAin prtdiag output. The tape drive is not attached to HBA. The tape drive I am going to attach is Sony AIT3. 1.How can I make... (3 Replies)
Discussion started by: sriny
3 Replies

7. 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
Login or Register to Ask a Question