FTP zero size file


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users FTP zero size file
# 1  
Old 05-16-2013
FTP zero size file

Hi AM using unix Aix Ksh
I need to clarify regarding sending the zero size file to another server.

When am Sending the Zero Size File getting alerts netout write returned Zero.
But i would like to know $VAL variable what error code or what value is present in $VAL variable when Sending the Zero Size File ?

If any one knows tell me tanks in advance...
# 2  
Old 05-16-2013
Its a warning message you receive when you transfer the 0 byte file via ftp.
If you want to redirect it use 2> /dev/null in your ftp.sh script

If i am not wrong it will return status code as 0 as its just a warning message. For more information you have to read through write system call and see how fd behaves Smilie
# 3  
Old 05-16-2013
Thanks Vidyadhar ..

The status code is not 0 , its return some other value .
Code:
$VAL 2 > $ERR
if [ $VAL -ne 0 ]
then
      echo "FTP failure"
else
     echo "FTP SUCCESS'
fi

when i run this am getting FTP Failure. want to know $VAL value ret code ?
# 4  
Old 05-16-2013
Cant you echo it before checking?
# 5  
Old 05-16-2013
I seem to recall a thread about this before...

How is this an error? You're writing a 0-byte file, and it complains that 0 bytes are written... which is exactly what you wanted, so nothing to worry about apparently.

This is not how you check the return code of something, the $? variable holds the return code.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

FTP a huge Size file

Dear All, Good Evening!! I have a requirement to ftp a 220GB backup file to a remote backup server. I wrote a script for this purpose. But it takes more than 8 hours to transfer this file. Is there any other method to do it in less time??? Thanks in Advance!!! ---------- Post updated... (5 Replies)
Discussion started by: Naga06
5 Replies

2. Shell Programming and Scripting

Checking the size of a file after FTP

Hi I am doing a FTP process through which I am copying a file from my local server to Remote server. After this I want to check the size of the file Below is my program: LOCALDIR=/batch/ediprocess REMOTESERVER=test.appl.com REMOTEPATH=batch/ftpTest LOGIN=px PASSWORD=abcd ftp -n... (3 Replies)
Discussion started by: shanth_chandra
3 Replies

3. Shell Programming and Scripting

How to check file size before and after FTP

I want to trasfer file from 1. Unix server A to server B 2. Unix server A to windows directory Is there a way to check the size before and after FTP. I want to check the size of the file in server A before FTP and in server B after FTP in case 1 In case 2 I want to check the size of... (1 Reply)
Discussion started by: i.scientist
1 Replies

4. Shell Programming and Scripting

size of a file that iam ftp ing

Hi, I want to compare the size of the files in my local machine before ftp ing it and the size of the file in the remote machine i.e after ftping . SO that the ftp is successful . (3 Replies)
Discussion started by: dineshr85
3 Replies

5. Shell Programming and Scripting

How to compare file size after ftp?

Is possible if I want to campare file size on source and destination after ftp transfer? If anybody know, please explain to me. (1 Reply)
Discussion started by: icemania
1 Replies

6. Shell Programming and Scripting

Perl FTP - check file size

The FTP perl module does not have any function which checks if the file downloaded is of size 0. Is there any way in perl to check while getting the files through FTP? Sometimes, there might be a problem with FTP and the downloaded file maybe of size 0. Hence, I would like to FTP that file... (1 Reply)
Discussion started by: rahulrathod
1 Replies

7. Shell Programming and Scripting

ftp UnixWare File Size Problem

Hi Engg. ! :cool: When I am trafering a file through ftp from windows to UNIX having size about 1.24 GB then at the end of file transfer I got a error message "Extended file size limit (coredump)" and finnally ftp stop, whenever on other UNIX server the same file from windows... (1 Reply)
Discussion started by: Niraj Gopal Sha
1 Replies

8. Shell Programming and Scripting

send file of size 0 with FTP on AIX

I'm using IBM AIX 5.2 to send file with ftp to other unix machine. The command is into a shell: ... ftp -n > outFtp 2> errFtp <<PARAM open $2 user $3 $4 put $1 $remote bye PARAM ... then i look at the size of errFtp and outFtp to see if there are some error message.... (4 Replies)
Discussion started by: gggarb
4 Replies

9. UNIX for Dummies Questions & Answers

ftp hangs on file size = 0

I have an ftp process which runs every 10 minutes between Unix and an NT box. Normally it works, but when the script tries to get a file from NT that has a length of 0, the ftp process hangs (as if it is still waiting for the end of the file). This is the script... (3 Replies)
Discussion started by: mheinrich
3 Replies

10. UNIX for Advanced & Expert Users

ftp file size

how to compare file size which has been received through ftp get from a remote location with local copy available any clue regards (5 Replies)
Discussion started by: sathiya
5 Replies
Login or Register to Ask a Question