08-09-2009
SFTP script - poll every min to check file complete before transfering
Hello,
Before I do a GET remote file, I need to ensure the remote file is a complete file i.e. whatever process is saving the file to the remote folder should complete the transfer before I go GET it through my script.
So I'm thinking I need to poll the remote file every minute or so to check the file size and if between 2 polls if the file size is same then go ahead and GET the file.
I'm struggling as as this polling needs to be done on the remote folder and
!sleep command does not work in sftp . Any help really appreciated.
Thanks - Neel
9 More Discussions You Might Find Interesting
1. Filesystems, Disks and Memory
Hi folks...
some process is writing a file....
as soon as the process starts the file comes there, and its growin..
now i in another script want to ftp the file. i don't know if the file is complete or not.
the process which writes the file is some other application and hence can't... (0 Replies)
Discussion started by: sade
0 Replies
2. AIX
Hi
I am looking for a way to confirm whether a core File is complete or Truncated
Is there any way
from
Khan (2 Replies)
Discussion started by: khan_069
2 Replies
3. HP-UX
hi
I have a core file from customer and i am looking for a way to know whether its complete or truncated?
I have a procedure to check core file on solaris , is there any way to know whether core is truncated on HP-UX?
from
khan (1 Reply)
Discussion started by: khan_069
1 Replies
4. Shell Programming and Scripting
Hi
I have to write a script, that will find out the lists of files in a particular directory, which are created between 30-60 min intervals. (3 Replies)
Discussion started by: velocitnitin
3 Replies
5. Shell Programming and Scripting
Hello All,
we have scenarion where we need to pull the Files from Windows to Unix Box through SFTP protocol. as per our analysis we did install the cygwin package on the Windows Box to have the openSSH package functionality.
1.Will openSSH help us to achieve the functionality what we are... (3 Replies)
Discussion started by: Amey Joshi
3 Replies
6. Shell Programming and Scripting
hi,
Im using the following code for FTP
#!/usr/bin/ksh
ftp -v -n "10.29.45.11" << cmd
user "mahesva" "mahesva123"
get rtl.tar
quit
cmd
Below is the log when i run the above code
**********************************
Connected to 10.29.45.11.
220 (vsFTPd 2.0.1)
530 Please login with USER... (20 Replies)
Discussion started by: dll_fpga
20 Replies
7. UNIX for Dummies Questions & Answers
noted down (44 Replies)
Discussion started by: mirwasim
44 Replies
8. Shell Programming and Scripting
hi,
how can i check whether the sftp connectivity is successful or not??
i am using expect script to connect to sftp..
sftp_script
spawn /usr/bin/sftp abc@ftp.xyz.com
expect "abc@ftp.xyz.com's password:"
send "password\r"
expect "sftp>"
send "mput *.txt\r"
expect "sftp>"
send "bye\r"... (8 Replies)
Discussion started by: Little
8 Replies
9. Shell Programming and Scripting
Hi,
Can any1 provide the code for my req:
I am loading few set of files into database through one unix script. I ll try to describe the process:
load_cdr-->main script
Source Feeds are A & B.
File in A-akm.dat
File in B-bkm.dat
Now my script runs through cron jobs everyday...and for both... (6 Replies)
Discussion started by: gnnsprapa
6 Replies
LEARN ABOUT REDHAT
rpload
rpload(1) General Commands Manual rpload(1)
NAME
rpload - pine remote data utility
SYNTAX
rpload [ -f ] [ -s trimSize ] -t Type -l Local_file -r Remote_folder
DESCRIPTION
Rpload may be used to convert local Pine configuration files or address books into remote configurations or address books. It is intended
to be used by system administrators. Regular users should normally use the facilities provided within Pine.
Local_file will usually be a user's pine configuration file, and Remote_folder is the IMAP folder which will be used (with the help of
Pine's -p, -P, and -x commands or PINECONF, PINERC, and PINERCEX environment variables) as the user's remote configuration folder. A copy
of Local_file will be placed in the folder with the correct header lines to satisfy Pine.
-f Force the load even if the remote folder is in the wrong format. This will delete the contents of the folder so use it
carefully.
-s trimSize If the number of messages in the remote folder is more than one plus trimsize (one is for the header message), then
messages 2, 3, and so on will be deleted until there are only one plus trimsize messages left. If this option is not
set no trimming will be done.
-t Type The possible Types are pinerc, abook, and sig. (Sig is mostly obsolete. Literal signatures contained within the remote
pinerc should be used instead.)
-l Local_file The file on this system that is to be copied.
-r Remote_folder A remote folder name to be copied to. See the Pine documentation for the syntax of a remote folder name. One example
is
{my.imap.server}remote_pinerc.
DIAGNOSTICS
Exit status is zero if all goes well, -1 otherwise.
SEE ALSO
Rpdump(1).
Copyright 1989-2001 by the University of Washington. Pine and Pico are trademarks of the University of Washington.
$Date: 2001/10/01 19:24:03 $
rpload(1)