![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
regarding FTP
hi frnds..
hi have a FTP script.. How can i chk whether file/files has been ftp'd successfully. coz if they are not.. I need to ftp it again... pl hlp.. thanks. anchal. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
use ftp's "ls" command to check for the filename, put the whole thing in some "if then else" condition.
This is generic answer, since you didn't show the relevant parts of your script. |
|
#3
|
|||
|
|||
|
thanks for the reply.
but ..i didnt get what i can get with "ls". .. actually my prob is that I wnt to chk for the file size..if its zero KB thn I need to ftp it again....and/or 'll send a mail.. so how can i chk for the file size on ftp prompt..?? |
|
#4
|
|||
|
|||
|
You can do ls -s in ftp
|
|
#5
|
|||
|
|||
|
how can i implement this... :-(
if I m not wrong ls -s give the used space..... but it doesnt gives the size... |
|
#6
|
|||
|
|||
|
Its always better to map the checksum of the file .... at source and destination pool. if the checksum is matched... then ..file is copied successfully.. for sure..
Use " cksum " for the file size varification . |
|
#7
|
|||
|
|||
|
The -s option gives the file size in blocks, including indirect blocks, for each entry.
Other than some specified commands, you cannot use it in ftp mode. So better to delete zero byte files in the landing directory and start the ftp for those file again.. Need to see your code........... |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|