Sponsored Content
Full Discussion: ftp return code not working
Special Forums UNIX Desktop Questions & Answers ftp return code not working Post 302388639 by zaxxon on Thursday 21st of January 2010 04:17:05 AM
Old 01-21-2010
The return code of ftp is always 0 because it is just returning that it has been successfully called. The internal return codes of ftp like for example:
Code:
200 PORT command successful

can't be cought outside ftp by evaluating $?. This could achieved by parsing the log of the ftp session for example. Maybe scp is an alternative for you too. It is key based, encrypted and you can immediately check $?.

---------- Post updated at 10:17 AM ---------- Previous update was at 10:16 AM ----------

I added his missing ! and reformatted the code since he said the ftp itself worked. Just as side note.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

FTP return value

Hi guys, I am having a problem to determine if the FTP request I had was successful or not... Here is what I do: In a shell script I call another shell script to do the FTP like: #!/bin/ksh echo "Hello..." ... # call do_ftp.sh do_ftp.sh $SERVER $USR $PASS $FILE.... status=$? if ; then ... (7 Replies)
Discussion started by: Shaz
7 Replies

2. UNIX for Advanced & Expert Users

return code on ftp if filesystem full??

Does anyone know what the return code will be if an ftp fails because the /var/tmp filesystem is full? AIX 4.3 (1 Reply)
Discussion started by: lawadm1
1 Replies

3. Programming

getting the return code of forked child process (ftp)

Hi, From within my C++ program, I fork a child process and execl an ftp session (solaris), like this : std::string szStartCmd = "ftp -i -n -v 192.168.149.31"; int nExecRes = execl("/bin/sh", "sh", "-c", szStartCmd.c_str(), (char *)0); I use 2 pipes to communicate between my... (7 Replies)
Discussion started by: KittyJ
7 Replies

4. Shell Programming and Scripting

capture ftp return code..PLZ HELP

Hi all, i have written a code to ftp a file from one server to other.The ftp is happeneing successfully,but i am not able to capture the return code,to check if ftp has failed. plz help me to find out the return code....this is urgent below is the code i have written... (3 Replies)
Discussion started by: anju
3 Replies

5. UNIX for Dummies Questions & Answers

to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 's

Hi All, Can anyone please let me know the syntax / how to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 'system()' function and '${?}'. I am in a process to send the mail automatically with an attachment to bulk users. I have used 'Mailx' and 'Unencode'... (0 Replies)
Discussion started by: manas6
0 Replies

6. UNIX for Dummies Questions & Answers

FTP Return Code

Hi All, I have a problem to identify the error code thrown by FTP Server while uploading files. The message is : ftp return 32. I couldn't find out what is the meaning of that. :confused: OS is Sun Solaris 2.10. Anyone can help? Thanks a lot (1 Reply)
Discussion started by: wilsonSurya
1 Replies

7. IP Networking

FTP Return 32

Dear All, I have problem when uploading files the FTP Server threw message like this : ftp return 32. Files not get uploaded. OS is Sun Soalaris 2.10 Please help what is the meaning of that message... Thanks (3 Replies)
Discussion started by: wilsonSurya
3 Replies

8. Shell Programming and Scripting

No return code in ftp mget script

I have a automated FTP script that gets a file using mget. I am using mget because the date will change on the file frequently. The mget works, however if I incorrectly type the file (e.g. if I want to get /dog123 and I enter /dg*) I do not receive and error code from in the FTP session. The... (1 Reply)
Discussion started by: dog123
1 Replies

9. Linux

FTP not working under Linux but working under any other OS ??? Very strange

Dear all, I am totally despaired and puzzled. Using Filezilla under Windows under the same network as our Linux servers is working. Using FTP command-line client under any of our Linux debian servers is not working ! I tried with different FTP servers -> same problem ! All commands are... (12 Replies)
Discussion started by: magix_ch
12 Replies

10. Shell Programming and Scripting

How to capture 3 digit return code of ftp??

is it possible to capture the 3 digit return code of ftp commands in a local variable inside a shell script? Code: ftp remoteserver << EOFTP quote USER uid quote PASS pass prompt cd remote_directory mput file.txt bye EOFTP in the above script, if cd ... (4 Replies)
Discussion started by: Little
4 Replies
globus_i_gass_copy_state_target_s(3)				 globus gass copy			      globus_i_gass_copy_state_target_s(3)

NAME
globus_i_gass_copy_state_target_s - SYNOPSIS
Data Fields char * url globus_gass_copy_attr_t * attr globus_mutex_t mutex globus_fifo_t queue int n_pending int n_simultaneous int n_complete globus_i_gass_copy_target_status_t status globus_gass_copy_url_mode_t mode union { struct { } ftp struct { globus_gass_transfer_request_t request } gass struct { globus_bool_t free_handle globus_bool_t seekable } io } data Detailed Description GASS copy target (e.g. source, destination) transfer information. Field Documentation char* globus_i_gass_copy_state_target_s::url url for file transfer globus_gass_copy_attr_t* globus_i_gass_copy_state_target_s::attr attributes to control file transfer globus_mutex_t globus_i_gass_copy_state_target_s::mutex coordinates the modifying of the target structure globus_fifo_t globus_i_gass_copy_state_target_s::queue a queue to manage the reading/writing of data buffers int globus_i_gass_copy_state_target_s::n_pending Used for keeping track of reads/writes in the read/write queue. int globus_i_gass_copy_state_target_s::n_simultaneous Used to limit the number of n_pending. int globus_i_gass_copy_state_target_s::n_complete Used to compute the offset for ftp writes. globus_i_gass_copy_target_status_t globus_i_gass_copy_state_target_s::status signifies the target has been successfully setup globus_gass_copy_url_mode_t globus_i_gass_copy_state_target_s::mode mode used to identify the below target union struct. struct { ... } globus_i_gass_copy_state_target_s::ftp ftp specific data globus_gass_transfer_request_t globus_i_gass_copy_state_target_s::request GASS equivelent of a handle. struct { ... } globus_i_gass_copy_state_target_s::gass GASS specific data. globus_bool_t globus_i_gass_copy_state_target_s::free_handle If the IO handle was passed as an argument then FALSE If the IO handle was created internally then TRUE. globus_bool_t globus_i_gass_copy_state_target_s::seekable Can globus_io_file_seek() be performed on this handle? struct { ... } globus_i_gass_copy_state_target_s::io IO specific data. union { ... } globus_i_gass_copy_state_target_s::data data required to perform each type of transfer Author Generated automatically by Doxygen for globus gass copy from the source code. Version 8.4 Mon Apr 30 2012 globus_i_gass_copy_state_target_s(3)
All times are GMT -4. The time now is 10:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy