Ftp Error Checking
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more
Ftp Shell Script With Error Handling
about Stack Overflow the company Business Learn more about hiring developers or posting ads ftp error codes with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow
Ftp Return Codes Unix
is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Checking ftp return codes from Unix script up vote 3 down vote ftp return codes mainframe favorite 1 I am currently creating an overnight job that calls a Unix script which in turn creates and transfers a file using ftp. I would like to check all possible return codes. The man page for ftp doesn't list return codes. Does anyone know where to find a list? Anyone with experience with this? We have other scripts that grep for certain return strings in the log, and how to check if ftp is successful in windows they send an email when in error. However, they often miss unanticipated codes. I am then putting the reason into the log and the email. unix ftp scripting return share|improve this question edited Nov 6 '14 at 12:44 Cristian Ciupitu 9,97932945 asked Sep 26 '08 at 14:53 Glenn Wark 5444818 Thanks guys, as you can probably tell, my unix scripting is not that far along. I'm basically working from other scripts by people that used to work here. However, I'd like to make it more bulletproof than what I've found so far. I appreciate all answers so far. –Glenn Wark Sep 26 '08 at 15:49 Basically my code so far is as follows: echo " open $ftpip pwd binary lcd /out cd /in mput $datafile quit"|ftp -iv > $ftpreturn The -v option looks like what I need. But the $ftpreturn variable is blank. The file isn't getting ftp'd and is failing silently. What am I missing? –Glenn Wark Sep 26 '08 at 15:51 add a comment| 9 Answers 9 active oldest votes up vote 7 down vote accepted The ftp command does not return anything other than zero on most implementations that I've come across. It's much better to process the three
Search Username Password Remember Me? Register Lost Password? facebook google twitter rss Free Web Developer Tools Advanced Search Forum Operating Systems UNIX Help How to trap ftp
Dos Ftp Errorlevel
success/failure Thread: How to trap ftp success/failure Share This Thread Tweet ftp timeout This + 1 this Post To Linkedin Subscribe to this Thread Subscribe to This Thread September 22nd, 2004,09:58
Ftp Commands
AM #1 No Profile Picture AVS View Profile View Forum Posts Contributing User Devshed Newbie (0 - 499 posts) Join Date Aug 2004 Posts 37 Rep Power http://stackoverflow.com/questions/140012/checking-ftp-return-codes-from-unix-script 13 How to trap ftp success/failure Hi, I am doing the following ftp -in $host << EOF_MYFTP user $user $password cd $dest_dir put $dest_file yourftp.fil EOF_MYFTP I want to know if really 'put' has succeeded in putting the file to destination. If for any reason the file is not put in destination [maybe due to problems in destination server like space http://forums.devshed.com/unix-help-35/trap-ftp-success-failure-185613.html constraint, etc] I need to know that. I just need to know if it has succededd or failed and I dont want to know why it din't. Based on the failure I will exit this prog with exit code 1 and if it is success I want to exit with exit code 0. Is there any way? Thanks Faq Reply With Quote September 23rd, 2004,01:17 AM #2 No Profile Picture guggach View Profile View Forum Posts Contributing User Devshed Beginner (1000 - 1499 posts) Join Date Jul 2004 Location Middle Europa Posts 1,198 Rep Power 16 ftp is very avaricious with exit codes, it's printing messages a way is collect and check the output, like: ftp -in $host << EOF_MYFTP >result user $user $password cd $dest_dir put $dest_file yourftp.fil EOF_MYFTP then using grep|sed or what ever, analize the 'result' file don't forget a 'bye' or 'quit' before EOF_MYFTP - a second way is to use a better ftp: google for 'ncftp' it's really better btw: ftp can get probls running in 'passive' mode, not ncftp. F
Technology and Trends Enterprise Architecture and EAI ERP Hardware IT Management and Strategy Java Knowledge Management Linux Networking Oracle PeopleSoft http://unix.ittoolbox.com/groups/technical-functional/shellscript-l/error-handling-if-ftp-fails-1208688 Project and Portfolio Management SAP SCM Security Siebel Storage UNIX Visual http://search400.techtarget.com/tip/Automatically-check-FTP-process-for-errors Basic Web Design and Development Windows < Back CHOOSE A DISCUSSION GROUP Research Directory TOPICS Database Hardware Networking SAP Security Web Design MEMBERS Paul_Pedant DACREE MarkDeVries MacProTX Inside-ERP VoIP_News Inside-CRM I_am_the_dragon maxwellarnold Michael Meyers-Jouan TerryCurran Chris_Day Andrew.S.Baker Ramnath.Awate JoeTorre Locutus bracke Dennis Stevenson PCMag ftp error Craig Borysowich DukeGanote Richard mircea_luca iudithm Nikki Klein Clinton Jones AbhaiTripathi knowscognosdoi Iqbalyk bluesguyAZ59 COMPANIES HP, Voltage Security and ... Hitachi America, LTD Arbor Networks, Inc. Quest Software View All Topics View All Members View All Companies Toolbox for IT Topics UNIX Groups Ask a New Question Shell Script The Shell Script group is a forum ftp return codes where peers share technical expertise, solve problems, and discuss issues related to the use of Shell Scripts to configure UNIX or UNIX-like systems. Home | Invite Peers | More UNIX Groups Your account is ready. You're now being signed in. Solve problems - It's Free Create your account in seconds E-mail address is taken If this is your account,sign in here Email address Username Between 5 and 30 characters. No spaces please The Profile Name is already in use Password Notify me of new activity in this group: Real Time Daily Never Keep me informed of the latest: White Papers Newsletter Jobs By clicking "Join Now", you agree to Toolbox for Technology terms of use, and have read and understand our privacy policy. Error handling if FTP fails Bhavanam asked Oct 16, 2006 | Replies (9) Hi Iam writing a shellscript to transfer a file from one server to another server. using FTP src Dest Address, FTP Dest directory, Put file it is working properl
tools iSeries CL programming iSeries COBOL programming iSeries ILE programming iSeries Java programming iSeries programming commands Visual basic on iSeries File Sharing View All Integrated File System (IFS) iSeries Access (Client Access) iSeries managed email and groupware NetServer Network File System (NFS) QNTC File System High Availability View All Business Continuity High Availability Tools Replication IBM iSeries division news View All iSeries application development View All iSeries Application development tools iSeries CL programming iSeries COBOL programming iSeries ILE programming iSeries Java programming iSeries programming commands RPG iSeries programming Visual basic on iSeries iSeries backup and recovery View All Data backup, storage and retrieval on iSeries iSeries disaster recovery and business continuity Remote Journaling Restores Storage iSeries database management View All DB2 UDB (universal databases) iSeries SQL commands and statements Oracle on iSeries iSeries document output View All Imaging on iSeries Printing on iSeries Printing-Imaging Tools iSeries hardware management View All Grid Computing Logical Partitions (LPAR) On-demand Computing iSeries networking View All Connecting to Printers FTP Physical connections to iSeries Remote Access to iSeries TCP-IP VoIP iSeries security planning View All iSeries physical security iSeries system and application security Security Tools iSeries systems management View All Change Management Debugging i5-OS -- OS-400 iSeries Applications iSeries compliance and regulation iSeries service and support issues iSeries system performance and monitoring Multi-platform Integration Performance Server Consolidation Server Installation Server Pricing Systems Management Tools iSeries training and education View All iSeries job market iSeries skills User Groups iSeries upgrades and modernization View All Web Topics Archive View All iSeries Resources Please select a category File Sharing High Availability IBM iSeries division news iSeries application development iSeries backup and recovery iSeries database management iSeries document output iSeries hardware management iSeries networking iSeries security planning iSeries systems management iSeries training and education iSeries upgrades and modernization Section Problem Solve News Get Started Evaluate Manage Problem Solve Sponsored Communities Automaticall