Ftp Error Codes In Unix
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 about Stack Overflow the company Business Learn more about hiring developers or posting ads with us
Ftp Error 426
Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow ftp return codes mainframe Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Checking sftp return codes ftp return codes from Unix script up vote 3 down vote 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
Ftp Error 421 Service Not Available
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 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
Ftp Error 500
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 digit codes in the log - and if you're sending a binary file, you can check that bytes sent was correct. The three digit codes are called 'series codes' and a list can be found here share|improve this answer edited Nov 6 '14 at 12:45 Cristian Ciupitu 9,97932945 answered Sep 26 '08 at 15:03 ColinYounger 3,86032332 Sorry to be a pain, but I have 2 questions. 1) But where is the log? I assumed that it would be in $ftpreturn. 2) How do I check the bytes sent? –Glenn Wark
Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here. Search Forums Show Threads Show Posts Tag Search Advanced Search Unanswered Threads Find All Thanked Posts Go to Page... http://www.unix.com/shell-programming-and-scripting/248567-ftp-exit-error-codes.html linux operating commands and unix operating commands FTP exit and error codes Shell Programming and Scripting Tags bash, exit code, ftp, ftp issues, linux and unix Page 1 of 2 1 2 > Thread Tools Search this Thread Display Modes #1 06-23-2014 dhruuv369 Registered User Join Date: Jun 2013 Last Activity: 21 August 2015, 6:35 AM EDT Location: New York Posts: 55 Thanks: 29 Thanked 1 Time in 1 ftp error Post FTP exit and error codes I have a script which connects to a remote server via FTP and gets some file from there. Code: #!/bin/bash /usr/bin/ftp -n remote.hostname.com <