ftp provides return codes. It does not return an error to the shell normally. If you read the responses from ftp you can determine on a per file basis the status of each transfer.
1nn == acknowledgement of your request
2nn == sucess
3nn 4nn == problems
This is a simplifcation, but it works for most situations
Since you are interested in all files, you have to track each file transfer and look for an error.
mput will give errors as well, plus when you use mput, you need the -i option
The reason for one-at-a-time is so you can pick up where you left off, plus I am assuming the files are large, so ftp reconnects take only a tiny amount of time compared to transfers.
Some years ago our company chose to run a critical proprietary app under SCO Unix.
My predecessor tried to move A SCO Unix virtual machine from our dedicated VMWare environment to a shared Cloud VMWare environment. My predecessor received licensing messages from these critical servers so... (2 Replies)
Hi,
I have ftp script like below
How to insert an error handling, If the transfer failed then send mail to me.
Actually, I just need the script to send an email if the FTP failed. How to put the email script within FTP script?
Thank You
Edy (5 Replies)
Hello fellow UNIX gurus :)
I have a problem regarding the script below:
# Variables used in this shell.
power=0 # Stores squared integer
total=0 # Sum of all squared integers
num=0 # Stores command line arguements
# Provides error handling if command line... (5 Replies)
I have a pattern for filename to be searched.
I need to get the files from remote server Who are matching the file pattern.
And i need to exit with non zero return code for:
1)No files found matching that pattern
2)More than one files matching the name pattern.
If only one files is... (1 Reply)
Hi,
I am using Ubuntu 10.04. Recently I have seen this error appear in my terminal as I edit text files with gedit:
(gedit:2841): Gtk-CRITICAL **: gtk_widget_is_ancestor: assertion `ancestor != NULL' failed
Any ideas on what this means?
Mike (1 Reply)
Helo Experts,
I need a help in handling errors in shell script, wants my errors displayed in text file instead of command window..
My shell script is here;
cd /cygdrive/s/Files
for FILES in ./*.*
do
temp=`basename $FILES`
if cp $FILES /cygdrive/r/CopyFile1/$FILES; then
echo "copy... (5 Replies)
Hello All,
How we can capture the FTP file transfer status. I would like do the exceptions handling for the FTP file transfer
My code is something like this...
ftp -nvi $FTP_SRVR |&
print -p user $UID $PWD
print -p cd mydir
print -p put $FILE_NAME
print -p close
print -p bye
... (3 Replies)
I have a script which connects to remote server and ftp the files
It works fine, however if there is any failure in ftp connection can it be handled???
ftp log
ftp session start time is: Thu Jun 19 00:00:02 BST 2008
Not connected.
Not connected.
Interactive mode off.
Not connected.... (1 Reply)
Hello,
This morning we have added 6 new disks (73 Gb) to our DS4300, then created a new Array en then created a logical drive, after this was done, teh following error occourd on the last 3 (new)disks:
Date/Time: 22-4-08 6:56:26
Sequence number: 5472
Event type: 282D
Event category:... (1 Reply)
I am new to this socket programming stuff. I have a problem to fix.. i got the error message. "CRITICAL 11/08/05 12:06:26 _getsockopt reports error. errno: 239"
can some please help me with this.. how do i go about fixing this error.
thanx in advance.. (0 Replies)