![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Denying IPaddress for Multiple Failed Login Attempts | metzgerh | AIX | 1 | 12-13-2006 04:13 PM |
| Failed to check status code in "rsh" command | nir_s | Shell Programming and Scripting | 9 | 07-03-2006 09:05 AM |
| invalid login attempts... | mr_manny | SUN Solaris | 6 | 12-01-2005 02:10 PM |
| Failed dependencies of rpm / how does RPM check for ? | mod | Linux | 2 | 09-20-2003 07:33 PM |
| AIX logon attempts | eysheikah | Security | 0 | 06-20-2003 09:24 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
ftp check for failed attempts
Hi,
I have created the below ftp script to put files over to our capacity server, the check at the end works if ftp fails to run however if the script cannot login or the transfer itself failed there is no warnings. Does anyone know the syntax to trap the erorr codes or to put a check within FTP? Thanks a million .... # create an ftp script to move the data to sftp echo "ftp -v -i -n $SERV <<!EOF" > $FTP echo "user capacity.ftp C@p@C1ty" >> $FTP echo "binary" >> $FTP echo "prompt" >> $FTP # Find the processed nmon file to be sent to capacity server for processing: cd $OUTDIR PDATE=`perl -le '($year,$mon,$day,$hrs,$min)=(localtime(time()-$ARGV[0]))[5,4,3,2,1];printf "%04d%02d%02d_%02d\n",$year+1900,$mon+1,$day,$h rs,$min' 3600` TFILE=`ls ${NFILE}_${PDATE}*.csv` if [ -f ${OUTDIR}/${TFILE} ] ; then continue else logfile "$TFILE is not available for transfer, please investigate and transfer the file." exit 1 fi echo "mput $TFILE" >> $FTP echo "$DATE:$TIME//Transfering $TFILE to $SERV " >> $PROGLOG echo "!EOF" >> $FTP chmod 777 $FTP #$FTP if [ $? -ne 0 ] ; then logfile "failed to FTP $TFILE to $SERV" fi |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|