Hi All,
To transfer the files, from one server to another through SFTP, i am using below code in my script.
I have 3 problems here.
1. The log file is contains all information produce by sftp command. For example, if one file is 149 MB in size, the log file will show following information about that file.
I have total 96 files, and for each file, sftp command output as above in log file, which looks weired. Instead for each file, i need only
2. As given above i am using mput /opt/myfile/inbox. But there are more than one inbox folder with number. ie inbox0, inbox1...inboxn which is dynamic.
How to get all files from all inbox folder? I have tried using
But it did not work.
3. How can i verify, the total number of files in source and target are same after SFTP?
I actually prefer scp over sftp for its compactness, but you might want to man sftp or sftp --help to get a better handle on your options; we cannot comment on what you have without you identifying your platform and SSH clients. The log is simply providing a progress meter by default. One of the options will allow you to disable this.
You would also do best to just rely on a subsequent ls of both your local and remote sets of files. Once you complete the upload ls your local set and then ls the remote via an SSH call.
Last edited by curleb; 05-19-2010 at 08:01 AM..
Reason: darn you, android keyboard!
hi guys,
i need a script to sftp the file from windows to unix server ....(before that i have to check whether the file exists in the windows server or not
and again i have to reverse sftp the files from unix to windows server.....
regards,
Vasa Saikumar. (13 Replies)
I had the below sftp script working perfectly but the problem is I am not able to send the echo statements .
#!/bin/sh
echo "Starting to sftp..."
sftp admin@myip << END_SCRIPT
cd /remotepath/
lcd /localpath/
mget myfiles*.csv
bye
END_SCRIPT
echo "Sftp successfully."
echo
echo... (11 Replies)
Hello,
I have a weird issue, I have RHEL 5.7 running with openssh5.2 where sftpgroup OS group is chroot. I see the difference difference in timestamp on files, when I login via ssh and SFTP, I see four hour difference, is something missing in my configuration.
#pwd... (8 Replies)
Hi All,
I am currently looking at automating the steps that I follow to download log files from putty to desktop.
I connect to a client's machine through citrix desktop. I am required to download quite a number of application logs to identfiy the issues in production.
Steps that is being... (3 Replies)
Hi,
I have situation where i need to automate transferring 10000+ files using sftp.
while read line
do
if ; then
echo "-mput /home/student/Desktop/folder/$line/* /cygdrive/e/folder/$line/">>sftpCommand.txt
fi
done< files.txt
sftp -b sftpCommand.txt stu@192.168.2.1
The above... (1 Reply)
We are using the solaris server and if i am using rm -rf to delete the directories its asking the confirmation for each and every file inside the directory.Is there any way to disable ( should not ask the confirmation) only for a particular session? (12 Replies)
Hi
We are trying to set up a non-interactive sftp to one of our clients to be able to transfer files to them. For the setup I logged into server1 as user1 and generated RSA public and private keys id_rsa and id_rsa.pub. Then I did an sftp to server2 as user2 and put the id_rsa.pub in the .ssh... (4 Replies)
Hi everyone,
i'm having a little trouble wih my first shell script ever.
So the point of that script is to:
-Archive Zip files in a directory
-Remove txt files from that directory
-connect through sftp and a rsa key to a remote server
-download a couple of files
-unzip downloaded files
... (0 Replies)
Hi,
While I am trying SFTP my machine to another unix machine ,
it was working fine till 10 min back.
But now i am getting the below error
"Request for subsystem 'sftp' failed on channel 0"
Could you please someone help me to solve or analyise the root cause...
Cheers:b:,
Mahiban (0 Replies)
Hello,
I'm new to linux/unix and presently at my work i have wrote a script that goes out from a unix host connects to a transfer proxy using sftp (username & password) with internal IP address as scp is disabled on the server..
Now my problem is that when i try and get a bigger file sftp will... (1 Reply)