Sponsored Content
Top Forums Shell Programming and Scripting Detecting a successfull FTP connection Post 84885 by beilstwh on Thursday 29th of September 2005 10:36:21 AM
Old 09-29-2005
Detecting a successfull FTP connection

I have a question. My company has to send a file to another company. The cron script currently just sends the file. However, every now and then the other companies ftp server is down. I wanted to alter my script to detect if the server is up before I attempt to send the file. My idea follows

# Check to see if xxx ftp application is working
ftpResponse=`ftp -n -v XXX.XXX.XXX.XX < $GERS_HOME/adhoc/arcr/FTPCHK.ftp`

#echo "$ftpResponse"

ftpnum=`echo "$ftpResponse"|grep 230 | wc -c`

#echo $ftpnum

if [ $ftpnum -gt 0 ] ; then
.....
fi



The ftp sites IP number does not contain the number 230 . The current response from the server is below. Do you think that this would be a robust method or do you have a more robust method?

Connected to XXX.XXX.XXX.X.
220 xxx_FTP1
331 Password required for XXXXXXX.
230 User XXXXXXX logged in.
221 Bye bye ...

Meaning of the returned FTP codes.
220 Service ready for new user.
331 User name okay, need password.
230 User logged in, proceed.
221 Service closing control connection. Logged out if appropriate.
 

10 More Discussions You Might Find Interesting

1. IP Networking

FTP connection problem

We have moved our DNS and DHCP to Windows 2000 from BIND. Our FTP Server is running Solaris 2.6, users who receive an i.p. address from win2k DHCP receives a connection failed error when trying to FTP and users who have static i.p. address can FTP with no problems. Can anyone shed light as to... (11 Replies)
Discussion started by: cassy
11 Replies

2. Shell Programming and Scripting

Detecting data loss during FTP

Hi, How we can detect that there has been a data loss during FTP, throught Shell scripting? I have gone through FTP return codes, but, none indicate that there has been any data loss. Can we use FTP return code 226 as an indication that during file transfer there has been no data loss? If,... (4 Replies)
Discussion started by: sameerbo
4 Replies

3. Cybersecurity

FTP Connection

I just started a new job and inherited a Fedora core 3 server. I wanted to open the ftp ports and I wanted to verify this code before I mess things up. From my reading the two lines below should allow ftp access can anyone confirm my attempt. iptables -A INPUT -p tcp - sport 21 -m state - state... (0 Replies)
Discussion started by: mungaz
0 Replies

4. Solaris

solaris 10 isnt detecting my internet connection

I installed solaris 10 on my desktop pc, however it does not detect my internet connection. IM also running redhad and that detects it automatically, so i guess i have to go in manually and change something. Im new to all this however and i have no idea how to proceed. (5 Replies)
Discussion started by: stride6
5 Replies

5. SCO

ftp connection

I have problem with ftp connection on SCO UNIX 5.0.7, it is work slowly. How I can make accelerate. (6 Replies)
Discussion started by: draganmi
6 Replies

6. UNIX for Dummies Questions & Answers

FTP Connection

Hi, Anyone encounter whereby when you FTP from an Unix server (Solaris 8) to another server (Window Server 2003), you tend to wait a long while when you do a "ls" and you get a timeout after that. However, when you FTP again and do a "ls", the result of "ls" shown immediately. All connection are... (5 Replies)
Discussion started by: ahlude
5 Replies

7. Shell Programming and Scripting

FTP connection problem

I am getting the error in this command when i am pitting it in shell script ftp -nvi jcmpcor1.abc.com >/work/test98.dat << EOD error:- invalid command. but when i am writting it from outside it work fine. (7 Replies)
Discussion started by: ravi214u
7 Replies

8. HP-UX

ftp first connection closed

Hi, Have anyone seen this problem, there is one remote side where their ftp connection to our server will always fail with connection closed by remote host and the second connection will be working. is this an OS issue or network issue? Thanks Robert (4 Replies)
Discussion started by: robertngo
4 Replies

9. Solaris

Solaris 10 ftp connection problem (connection refused, connection timed out)

Hi everyone, I am hoping anyone of you could help me in this weird problem we have in 1 of our Solaris 10 servers. Lately, we have been having some ftp problems in this server. Though it can ping any server within the network, it seems that it can only ftp to a select few. For most servers, the... (4 Replies)
Discussion started by: labdakos
4 Replies

10. Debian

ftp connection refused

I have two computers running Debian 6.0 and one running Solaris 2.6 on a private network. The Debian computers can ftp to the Solaris computer but if a Debian computer is the destination the ftp connection is refused. I assume this is some security feature of Debian. What can I do to allow... (2 Replies)
Discussion started by: snorkack59
2 Replies
DateTime::Locale::tg_Cyrl(3)				User Contributed Perl Documentation			      DateTime::Locale::tg_Cyrl(3)

NAME
DateTime::Locale::tg_Cyrl SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'tg_Cyrl' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Tajik Cyrillic. DATA
This locale inherits from the DateTime::Locale::tg locale. It contains the following data. Days Wide (format) XXXXXXX XXXXXXX XXXXXXXX XXXXXXXXX XXXXX XXXXX XXXXXXX Abbreviated (format) XXX XXX XXX XXX XXX XXX XXX Narrow (format) XXX XXX XXX XXX XXX XXX XXX Wide (stand-alone) XXXXXXX XXXXXXX XXXXXXXX XXXXXXXXX XXXXX XXXXX XXXXXXX Abbreviated (stand-alone) XXX XXX XXX XXX XXX XXX XXX Narrow (stand-alone) 2 3 4 5 6 7 1 Months Wide (format) XXXXX XXXXXX XXXX XXXXX XXX XXX XXX XXXXXX XXXXXXX XXXXXX XXXXX XXXXXX Abbreviated (format) XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX Narrow (format) XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX Wide (stand-alone) XXXXX XXXXXX XXXX XXXXX XXX XXX XXX XXXXXX XXXXXXX XXXXXX XXXXX XXXXXX Abbreviated (stand-alone) XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX Narrow (stand-alone) 1 2 3 4 5 6 7 8 9 10 11 12 Quarters Wide (format) Q1 Q2 Q3 Q4 Abbreviated (format) Q1 Q2 Q3 Q4 Narrow (format) 1 2 3 4 Wide (stand-alone) Q1 Q2 Q3 Q4 Abbreviated (stand-alone) Q1 Q2 Q3 Q4 Narrow (stand-alone) 1 2 3 4 Eras Wide XXX XX XXXXX XXX Abbreviated XXX XXX Narrow XXX XXX Date Formats Full 2008-02-05T18:30:30 = XXXXXXX, 2008 XXXXXX 05 1995-12-22T09:05:02 = XXXXX, 1995 XXXXXX 22 -0010-09-15T04:44:23 = XXXXX, -10 XXXXXXX 15 Long 2008-02-05T18:30:30 = 2008 XXXXXX 5 1995-12-22T09:05:02 = 1995 XXXXXX 22 -0010-09-15T04:44:23 = -10 XXXXXXX 15 Medium 2008-02-05T18:30:30 = 2008 XXX 5 1995-12-22T09:05:02 = 1995 XXX 22 -0010-09-15T04:44:23 = -10 XXX 15 Short 2008-02-05T18:30:30 = 08/02/05 1995-12-22T09:05:02 = 95/12/22 -0010-09-15T04:44:23 = -10/09/15 Default 2008-02-05T18:30:30 = 2008 XXX 5 1995-12-22T09:05:02 = 1995 XXX 22 -0010-09-15T04:44:23 = -10 XXX 15 Time Formats Full 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Long 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Medium 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Short 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 Default 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Datetime Formats Full 2008-02-05T18:30:30 = XXXXXXX, 2008 XXXXXX 05 18:30:30 UTC 1995-12-22T09:05:02 = XXXXX, 1995 XXXXXX 22 09:05:02 UTC -0010-09-15T04:44:23 = XXXXX, -10 XXXXXXX 15 04:44:23 UTC Long 2008-02-05T18:30:30 = 2008 XXXXXX 5 18:30:30 UTC 1995-12-22T09:05:02 = 1995 XXXXXX 22 09:05:02 UTC -0010-09-15T04:44:23 = -10 XXXXXXX 15 04:44:23 UTC Medium 2008-02-05T18:30:30 = 2008 XXX 5 18:30:30 1995-12-22T09:05:02 = 1995 XXX 22 09:05:02 -0010-09-15T04:44:23 = -10 XXX 15 04:44:23 Short 2008-02-05T18:30:30 = 08/02/05 18:30 1995-12-22T09:05:02 = 95/12/22 09:05 -0010-09-15T04:44:23 = -10/09/15 04:44 Default 2008-02-05T18:30:30 = 2008 XXX 5 18:30:30 1995-12-22T09:05:02 = 1995 XXX 22 09:05:02 -0010-09-15T04:44:23 = -10 XXX 15 04:44:23 Available Formats d (d) 2008-02-05T18:30:30 = 5 1995-12-22T09:05:02 = 22 -0010-09-15T04:44:23 = 15 EEEd (d EEE) 2008-02-05T18:30:30 = 5 XXX 1995-12-22T09:05:02 = 22 XXX -0010-09-15T04:44:23 = 15 XXX Hm (H:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 9:05 -0010-09-15T04:44:23 = 4:44 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 XX. XX. 1995-12-22T09:05:02 = 9:05 XX. XX. -0010-09-15T04:44:23 = 4:44 XX. XX. Hms (H:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 hms (h:mm:ss a) 2008-02-05T18:30:30 = 6:30:30 XX. XX. 1995-12-22T09:05:02 = 9:05:02 XX. XX. -0010-09-15T04:44:23 = 4:44:23 XX. XX. M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (M-d) 2008-02-05T18:30:30 = 2-5 1995-12-22T09:05:02 = 12-22 -0010-09-15T04:44:23 = 9-15 MEd (E, M-d) 2008-02-05T18:30:30 = XXX, 2-5 1995-12-22T09:05:02 = XXX, 12-22 -0010-09-15T04:44:23 = XXX, 9-15 MMM (LLL) 2008-02-05T18:30:30 = XXX 1995-12-22T09:05:02 = XXX -0010-09-15T04:44:23 = XXX MMMd (MMM d) 2008-02-05T18:30:30 = XXX 5 1995-12-22T09:05:02 = XXX 22 -0010-09-15T04:44:23 = XXX 15 MMMEd (E MMM d) 2008-02-05T18:30:30 = XXX XXX 5 1995-12-22T09:05:02 = XXX XXX 22 -0010-09-15T04:44:23 = XXX XXX 15 MMMMd (MMMM d) 2008-02-05T18:30:30 = XXXXXX 5 1995-12-22T09:05:02 = XXXXXX 22 -0010-09-15T04:44:23 = XXXXXXX 15 MMMMEd (E MMMM d) 2008-02-05T18:30:30 = XXX XXXXXX 5 1995-12-22T09:05:02 = XXX XXXXXX 22 -0010-09-15T04:44:23 = XXX XXXXXXX 15 ms (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 y (y) 2008-02-05T18:30:30 = 2008 1995-12-22T09:05:02 = 1995 -0010-09-15T04:44:23 = -10 yM (y-M) 2008-02-05T18:30:30 = 2008-2 1995-12-22T09:05:02 = 1995-12 -0010-09-15T04:44:23 = -10-9 yMEd (EEE, y-M-d) 2008-02-05T18:30:30 = XXX, 2008-2-5 1995-12-22T09:05:02 = XXX, 1995-12-22 -0010-09-15T04:44:23 = XXX, -10-9-15 yMMM (y MMM) 2008-02-05T18:30:30 = 2008 XXX 1995-12-22T09:05:02 = 1995 XXX -0010-09-15T04:44:23 = -10 XXX yMMMEd (EEE, y MMM d) 2008-02-05T18:30:30 = XXX, 2008 XXX 5 1995-12-22T09:05:02 = XXX, 1995 XXX 22 -0010-09-15T04:44:23 = XXX, -10 XXX 15 yMMMM (y MMMM) 2008-02-05T18:30:30 = 2008 XXXXXX 1995-12-22T09:05:02 = 1995 XXXXXX -0010-09-15T04:44:23 = -10 XXXXXXX yQ (y Q) 2008-02-05T18:30:30 = 2008 1 1995-12-22T09:05:02 = 1995 4 -0010-09-15T04:44:23 = -10 3 yQQQ (y QQQ) 2008-02-05T18:30:30 = 2008 Q1 1995-12-22T09:05:02 = 1995 Q4 -0010-09-15T04:44:23 = -10 Q3 yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 Miscellaneous Prefers 24 hour time? Yes Local first day of the week XXXXXXX SUPPORT
See DateTime::Locale. AUTHOR
Dave Rolsky <autarch@urth.org> COPYRIGHT
Copyright (c) 2008 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This module was generated from data provided by the CLDR project, see the LICENSE.cldr in this distribution for details on the CLDR data's license. perl v5.18.2 2017-10-06 DateTime::Locale::tg_Cyrl(3)
All times are GMT -4. The time now is 04:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy