The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > IP Networking
Google UNIX.COM


IP Networking Questions involving TCP/IP, Routers, Hubs, Network protocols, etc go here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
need some info about symbolic link and hard link detective linux UNIX for Dummies Questions & Answers 2 01-08-2008 03:36 AM
How to automate an FTP process? ksak Shell Programming and Scripting 1 10-06-2006 09:45 AM
Difference between hard link and soft link in unix RAJACHOKALINGAM UNIX for Dummies Questions & Answers 2 08-01-2006 01:10 AM
script to autorestart if uptime greater than... help needed. alternapop UNIX for Dummies Questions & Answers 11 01-19-2005 12:35 PM
Differences between hard link and soft link penguin-friend UNIX for Advanced & Expert Users 3 03-08-2002 11:49 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-24-2008
Registered User
 

Join Date: May 2007
Posts: 8
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Automate FTP process and autorestart on link failure

Hi Guys,

i have this lil challenge;

i am to implement an automated script that searches/scans a directory for files then picks and sends this files to a very remote server via an ftp link.
the challenge here is that the ftp link fails due to netwrk issues maybe;
i therefore need to develop a proactive means of detecting the present ftp session is no more active,then quit and restart a new session;
as this files are not supposed to stay inthis location for up to an hour.
someone help pls;
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-24-2008
sysgate's Avatar
Unix based
 

Join Date: Nov 2006
Location: /root
Posts: 1,073
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
an idea from me - if you have netcat installed use :
nc -z server.com 21
the response should be :
Quote:
Connection to server.com 21 port [tcp/ftp] succeeded!
then echo $? will return 0, on failure will return 1. Check the error code and proceed based on the response.
-z flag just checks for a live listener / daemon on the remote port, without sending the data. This should ensure that the connection is OK.
Reply With Quote
  #3 (permalink)  
Old 04-24-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 2,203
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Sounds like you should really be thinking about replacing that ftp link with something with sane error fallback and graceful degradation.
Reply With Quote
  #4 (permalink)  
Old 3 Days Ago
Registered User
 

Join Date: Jul 2008
Posts: 1
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Quote:
Originally Posted by era View Post
Sounds like you should really be thinking about replacing that ftp link with something with sane error fallback and graceful degradation.
What would you suggest as an alternative to scripted FTP here? I guess there are tools better suited to failing links but have no idea what these would be?
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 04:57 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101