The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-24-2008
anchal_khare anchal_khare is offline
Registered User
  
 

Join Date: Jun 2007
Location: Mumbai,India
Posts: 321
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.
  #2 (permalink)  
Old 01-24-2008
sysgate's Avatar
sysgate sysgate is offline Forum Advisor  
Unix based
  
 

Join Date: Nov 2006
Location: Bulgaria
Posts: 1,318
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 (permalink)  
Old 01-25-2008
anchal_khare anchal_khare is offline
Registered User
  
 

Join Date: Jun 2007
Location: Mumbai,India
Posts: 321
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 (permalink)  
Old 01-25-2008
thana thana is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 55
You can do ls -s in ftp
  #5 (permalink)  
Old 01-25-2008
anchal_khare anchal_khare is offline
Registered User
  
 

Join Date: Jun 2007
Location: Mumbai,India
Posts: 321
how can i implement this... :-(

if I m not wrong ls -s give the used space..... but it doesnt gives the size...
  #6 (permalink)  
Old 01-25-2008
manaspatra manaspatra is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 1
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 (permalink)  
Old 01-25-2008
thana thana is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 55
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...........
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 07:50 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0