I am writing one shell script. Below is the requirement
1. need to login to the SFTP server, go to the particular folder
2. take the file count in that folder and assign it to variable
3. came out of the SFTP server and check the condition, if the file count is less than the required count exit the script other wise further processing
4. then we need to move the files from SFTP to another server.
5. Need to check the file count in another server if all the files are not copied print the error msg and exit the script.
please help me with the sudo code. I am trying the below code it is getting error.
Last edited by Franklin52; 10-25-2012 at 05:58 AM..
Reason: Please use code tags for data and code samples
Hi,
i am able to login to AX server thru console but not able to login directly thru server.
also the server is not ping-able with other server.
filesystem is fine. and OS version is AIX 5.3.
please let me know if you need any specific log.
thx in advance.
Scriptor (2 Replies)
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)
Hey All,
I have a ascript which sftp files from Solaris to Windows. I am usgin expect and sending password though script.
I have observed that sometimes script works fine (manually or in cron) but after some run, the user I am usgin to connect is getting locked on Domain level.
I am... (6 Replies)
Greetings, guys. I'm not much of a programmer forgive me for being a noob, because of someone leaving, I was put in an IT spot where I have to figure out a few things. Being new to Linux and programming has been a challenge.
My boss has asked me to create an automated script to connect to a 3rd... (7 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)
I want to learn AIX. I would like to find someone who would be willing to give me a login to their AIX home lab server. My intent is to poke around and discover the similarities and differences of AIX compared to other *NIXs.
I am a UNIX admin so I can think of what some immediate concerns may... (1 Reply)
Hi,
I looked into lot of posts on this question but i could not figure out the solution. we are using the following ftp shell program to send the file to target server.
#!/usr/bin/ksh
ftp -n -i<<EOF 2>&1
open <target server ip>
user <username> <pwd>
lcd /sc/doc/prd/FCSTP
put file1.txt... (3 Replies)
Hello,
I have created a web page on a server using apache and added .htaccess and .htpasswd in the folder for authentification.
I was wondering if there was anyway to tie-in the login for this page with the login used to logon to the server.
i.e. the same login info. is used for both, when... (1 Reply)
Hello,
I have created a web page on a server using apache and added .htaccess and .htpasswd in the folder for authentification.
I was wondering if there was anyway to tie-in the login for this page with the login used to logon to the server.
i.e. the same login info. is used for both,... (2 Replies)
Hi,
I am connecting via SFTP to a remote Server. My problem is on trying to LOGin, I am asked for a password. I need to make this process automatic such that I can login without being prompted for a password.
I can achieve this if the remote server has a simple FTP server and not SFTP. How... (6 Replies)